Socket
Socket
Sign inDemoInstall

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.0.0 to 4.1.0

dist/index.cjs

38

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

@@ -35,16 +45,14 @@ "repository": {

"devDependencies": {
"@babel/core": "^7.15.5",
"@babel/register": "^7.15.3",
"@istanbuljs/nyc-config-babel": "^3.0.0",
"babel-plugin-istanbul": "^6.0.0",
"c8": "^7.10.0",
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
"coveralls": "^3.1.1",
"env-test": "^1.0.0",
"eslint": "^7.32.0",
"eslint": "^8.1.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.24.2",
"mocha": "^9.1.2",
"nyc": "^15.1.0"
"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"
}
}

@@ -1,5 +0,8 @@

const { isVinyl } = require('vinyl');
const streamToString = require('stream-to-string');
// import { isVinyl } from 'vinyl';
import Vinyl from 'vinyl'; // TODO: Use named imports when available
import streamToString from 'stream-to-string';
module.exports = (file, enc) => (!isVinyl(file) // eslint-disable-line no-nested-ternary
const { isVinyl } = Vinyl;
export default (file, enc) => (!isVinyl(file) // eslint-disable-line no-nested-ternary
? Promise.reject(new TypeError('First argument must be a Vinyl file'))

@@ -6,0 +9,0 @@ : file.isBuffer() // eslint-disable-line no-nested-ternary

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