Socket
Socket
Sign inDemoInstall

vinyl-assign

Package Overview
Dependencies
9
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.2.0

26

index.js
'use strict';
var objectAssign = require('object-assign');
var through = require('through2');
var Transform = require('readable-stream/transform');

@@ -9,15 +8,18 @@ module.exports = function (opts) {

return through.obj(function (file, enc, cb) {
if (file.isNull()) {
cb(null, file);
return;
}
return new Transform({
objectMode: true,
transform: function (file, enc, cb) {
if (file.isNull()) {
cb(null, file);
return;
}
if (file.isStream()) {
cb(new Error('Streaming is not supported'));
return;
if (file.isStream()) {
cb(new Error('Streaming is not supported'));
return;
}
cb(null, objectAssign(file, opts));
}
cb(null, objectAssign(file, opts));
});
};
{
"name": "vinyl-assign",
"version": "1.1.0",
"version": "1.2.0",
"description": "Apply custom attributes to vinyl files",

@@ -23,4 +23,4 @@ "license": "MIT",

"dependencies": {
"object-assign": "^2.0.0",
"through2": "^0.6.3"
"object-assign": "^3.0.0",
"readable-stream": "^2.0.0"
},

@@ -27,0 +27,0 @@ "devDependencies": {

@@ -5,8 +5,10 @@ # vinyl-assign [![Build Status](http://img.shields.io/travis/kevva/vinyl-assign.svg?style=flat)](https://travis-ci.org/kevva/vinyl-assign)

## Install
```bash
```
$ npm install --save vinyl-assign
```
## Usage

@@ -25,4 +27,5 @@

## License
MIT © [Kevin Mårtensson](https://github.com/kevva)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc