Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vinyl-contents-tostring

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vinyl-contents-tostring - npm Package Compare versions

Comparing version 4.1.1 to 5.0.0

index.js

38

package.json
{
"name": "vinyl-contents-tostring",
"version": "4.1.1",
"version": "5.0.0",
"description": "Convert vinyl file content to string",
"type": "module",
"main": "dist/index.cjs",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
".": "./index.js",
"./package.json": "./package.json"
},
"engines": {
"node": ">=12.2"
"node": ">=14.0"
},
"scripts": {
"lint": "eslint --cache .",
"build": "rollup -c",
"test": "mocha",
"cover": "c8 npm test",
"prepare": "npm run build"
"cover": "c8 npm test"
},

@@ -28,3 +23,3 @@ "repository": {

"files": [
"dist"
"index.js"
],

@@ -42,18 +37,19 @@ "keywords": [

"dependencies": {
"stream-to-string": "^1.2.0",
"bl": "^5.0.0",
"p-from-callback": "^1.0.0",
"vinyl": "^2.2.1"
},
"devDependencies": {
"c8": "^7.10.0",
"chai": "^4.3.4",
"c8": "^7.11.3",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"env-test": "^1.0.0",
"eslint": "^8.1.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-node": "^11.1.0",
"mocha": "^9.1.3",
"rollup": "^2.59.0"
"eslint": "^8.16.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-mocha": "^10.0.5",
"eslint-plugin-n": "^15.2.0",
"eslint-plugin-unicorn": "^42.0.0",
"mocha": "^10.0.0"
}
}
# vinyl-contents-tostring
[![Travis][build-badge]][build]
[![Build Status][build-badge]][build]
[![npm package][npm-badge]][npm]
[![Coverage Status][coveralls-badge]][coveralls]
[![Dependency Status][dependency-status-badge]][dependency-status]
[![devDependency Status][dev-dependency-status-badge]][dev-dependency-status]

@@ -21,13 +19,10 @@ > Convert vinyl content into string

```js
const vfs = require('vinyl-fs');
const map = require('map-stream');
const asCallback = require('ascallback');
const vinylToString = require('vinyl-contents-tostring');
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(
(file, cb) => asCallback(
vinylToString(file).then(contents => console.log(contents)),
cb,
),
callbackify(file => toString(file).then(contents => console.log(contents))),
));

@@ -54,7 +49,1 @@ ```

[coveralls]: https://coveralls.io/r/dotcore64/vinyl-contents-tostring
[dependency-status-badge]: https://david-dm.org/dotcore64/vinyl-contents-tostring.svg?style=flat-square
[dependency-status]: https://david-dm.org/dotcore64/vinyl-contents-tostring
[dev-dependency-status-badge]: https://david-dm.org/dotcore64/vinyl-contents-tostring/dev-status.svg?style=flat-square
[dev-dependency-status]: https://david-dm.org/dotcore64/vinyl-contents-tostring#info=devDependencies
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc