Socket
Socket
Sign inDemoInstall

unique-stream

Package Overview
Dependencies
8
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.2 to 2.1.0

25

index.js

@@ -0,3 +1,18 @@

'use strict';
var filter = require('through2-filter').obj;
var Set = require('es6-set');
var ES6Set;
if (typeof global.Set === 'function') {
ES6Set = global.Set;
} else {
ES6Set = function() {
this.keys = [];
this.has = function(val) {
return this.keys.indexOf(val) !== -1;
},
this.add = function(val) {
this.keys.push(val);
}
}
}

@@ -12,3 +27,3 @@ function prop(propName) {

function unique(propName, keyStore) {
keyStore = keyStore || new Set();
keyStore = keyStore || new ES6Set();

@@ -27,7 +42,7 @@ var keyfn = JSON.stringify;

return false;
} else {
keyStore.add(key);
return true;
}
keyStore.add(key);
return true;
});
}

13

package.json
{
"name": "unique-stream",
"version": "2.0.2",
"version": "2.1.0",
"description": "node.js through stream that emits a unique stream of objects based on criteria",
"main": "index.js",
"scripts": {
"test": "node_modules/.bin/mocha"
"test": "mocha"
},

@@ -22,11 +22,10 @@ "repository": {

"license": "BSD",
"dependencies": {
"through2-filter": "^1.4.0"
},
"devDependencies": {
"after": "~0.8.1",
"chai": "^1.10.0",
"chai": "^3.0.0",
"mocha": "^2.1.0"
},
"dependencies": {
"es6-set": "^0.1.1",
"through2-filter": "^1.4.0"
}
}

@@ -5,3 +5,3 @@ # unique-stream

[![build status](https://secure.travis-ci.org/eugeneware/unique-stream.png)](http://travis-ci.org/eugeneware/unique-stream)
[![Build Status](https://travis-ci.org/eugeneware/unique-stream.svg?branch=master)](https://travis-ci.org/eugeneware/unique-stream)

@@ -8,0 +8,0 @@ ## Installation

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