7.0.0 • Published 9 days ago

vinyl-contents-tostring v7.0.0

Weekly downloads
958
License
SEE LICENSE IN LI...
Repository
github
Last release
9 days ago

vinyl-contents-tostring

Build Status npm package Coverage Status

Convert vinyl content into string

Install

$ npm install vinyl-contents-tostring

Usage

import { callbackify } from 'node:util';
import vfs from 'vinyl-fs';
import map from 'map-stream';
import toString from 'vinyl-contents-tostring';

vfs.src(['./package.json'])
  .pipe(map(
    callbackify(file => toString(file).then(contents => console.log(contents))),
  ));

API

vinylToString(file, enc)

Returns a promise to the contents of the vinyl file, regardless of stream or buffer files. Optionally, it accepts the encoding of the file

License

See the LICENSE file for license rights and limitations (MIT).

7.0.0

9 days ago

6.1.1

1 year ago

6.1.0

2 years ago

6.0.0

2 years ago

5.0.0

2 years ago

4.1.0

3 years ago

4.1.1

3 years ago

4.0.0

3 years ago

3.0.0

4 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.0

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago