d522ac6883
uses promise.all now
1.5 KiB
1.5 KiB
Functions
- readLines(files, dir) ⇒
Promise.<array>
read lines from one or more files and return an array of those all those lines
- writeLines(filePath, list) ⇒
Promise.<null>
Writes files with a line for each element in a array or item in comma delimited list
readLines(files, dir) ⇒ Promise.<array>
read lines from one or more files and return an array of those all those lines
Kind: global function
Returns: Promise.<array>
- - resolves to an single array of all lines from all files (no guarenteed order)
Param | Type | Description |
---|---|---|
files | array | string |
array or comma delimited string of file paths. Can be absolute or relative (see dir) |
dir | string |
the directory to join to any relative paths |
writeLines(filePath, list) ⇒ Promise.<null>
Writes files with a line for each element in a array or item in comma delimited list
Kind: global function
Returns: Promise.<null>
- can catch errors but otherwise nothing resolves
Param | Type | Description |
---|---|---|
filePath | string |
filepath to which file is written |
list | array | string |
each element becomes line in file |