0.1.1 • Published 3 years ago
@fal-works/mere-file-transformer v0.1.1
mere-file-transformer
Tiny library for transforming multiple files asynchronously.
- Returns
Promise
. - Uses Node.js
stream
API. stream.Transform
needs to be prepared (consider using replacestream).
API
const transformFile: (rules: Rule[] | Rule) => (path: string) => Promise<void>;
const transformFiles: (rules: Rule[] | Rule) => (globPattern: string) => Promise<void>;
Here Rule
is any function that returns stream.Transform
.