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

neek

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

neek - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

.idea/compiler.xml

37

lib/neek.js
var fs = require('fs');
var isString = require('lodash.isstring');

@@ -10,11 +11,3 @@ var Transformer = require('./transform');

if (!isReadStream(input)) {
throw new Error('No input stream specified!');
}
if (!isWriteStream(output)) {
throw new Error('No output stream specified!');
}
if (typeof input === 'string') {
if (isString(input)) {
input = fs.createReadStream(input);

@@ -26,3 +19,3 @@ }

if (output !== 'string') {
if (typeof output === 'string') {
if (isString(output)) {
stream = fs.createWriteStream(output);

@@ -36,2 +29,10 @@ } else {

if (!isReadStream(input)) {
throw new Error('No input stream specified!');
}
if (!isWriteStream(stream)) {
throw new Error('No output stream specified!');
}
var transformer = new Transformer();

@@ -62,12 +63,14 @@

function isReadStream(rs){
return isStream(rs, process.stdin, '_read');
function isReadStream(obj) {
// some streams are readable but do not have `read()`, however
// we can reliably detect readability by testing for `resume()`
return isStream(obj) && typeof obj.resume === 'function';
}
function isWriteStream(ws){
return isStream(ws, process.stdout, '_write');
function isWriteStream(obj) {
return isStream(obj) && typeof obj.write === 'function';
}
function isStream(st, sys, prop){
return st && (st === sys|| typeof(st[prop]) === 'function' || typeof(st) === 'string');
}
function isStream(obj) {
return obj && typeof obj.pipe === 'function';
}

@@ -0,0 +0,0 @@ var Stream = require('readable-stream');

{
"name": "neek",
"version": "1.0.1",
"version": "1.0.2",
"description": "A simple implementation of *nix uniq in NodeJS to take advantage of streaming",

@@ -34,21 +34,22 @@ "author": {

"dependencies": {
"farmhash": "^1.1.1",
"hashes": "0.1.3",
"farmhash": "^1.2.1",
"hashes": "0.1.4",
"lodash.isstring": "4.0.1",
"minimist": "1.2.0",
"readable-stream": "2.1.4"
"readable-stream": "2.1.5"
},
"devDependencies": {
"grunt": "0.4.5",
"grunt": "1.0.1",
"grunt-cli": "1.2.0",
"grunt-codeclimate-reporter": "1.1.2",
"grunt-codeclimate-reporter": "1.2.1",
"grunt-contrib-clean": "1.0.0",
"grunt-contrib-jshint": "1.0.0",
"grunt-mkdir": "1.0.0",
"grunt-mocha-istanbul": "4.0.2",
"grunt-mocha-test": "0.12.7",
"istanbul": "0.4.3",
"jshint": "2.9.2",
"mocha": "2.4.5",
"should": "8.3.2"
"grunt-mocha-istanbul": "5.0.2",
"grunt-mocha-test": "0.13.2",
"istanbul": "0.4.5",
"jshint": "2.9.3",
"mocha": "3.1.0",
"should": "11.1.0"
}
}

@@ -0,0 +0,0 @@ Neek [![Build Status](https://travis-ci.org/zackehh/neek.svg?branch=master)](https://travis-ci.org/zackehh/neek) [![Code Climate](https://codeclimate.com/github/zackehh/neek/badges/gpa.svg)](https://codeclimate.com/github/zackehh/neek) [![Test Coverage](https://codeclimate.com/github/zackehh/neek/badges/coverage.svg)](https://codeclimate.com/github/zackehh/neek)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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