1
0
mirror of https://github.com/sasjs/lint.git synced 2025-12-10 17:34:36 +00:00

chore(*): add comments

This commit is contained in:
Krishna Acondy
2021-04-07 10:57:55 +01:00
parent 2e85cbab2f
commit 205bd0c8bc
2 changed files with 7 additions and 0 deletions

View File

@@ -1,3 +1,6 @@
/**
* Executes an async callback for each item in the given array.
*/
export async function asyncForEach(
array: any[],
callback: (item: any, index: number, originalArray: any[]) => any

View File

@@ -1,5 +1,9 @@
import { listFilesInFolder } from '@sasjs/utils/file'
/**
* Fetches a list of .sas files in the given path.
* @returns {Promise<string[]>} resolves with an array of file names.
*/
export const listSasFiles = async (folderPath: string): Promise<string[]> => {
const files = await listFilesInFolder(folderPath)
return files.filter((f) => f.endsWith('.sas'))