Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "eachy", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "a tiny (19 lines of code) serial async each/map module", | ||
"main": "eachy.js", | ||
"scripts": { | ||
"test": "node test.js" | ||
"test": "node_modules/.bin/nodeunit test.js", | ||
"coveralls": "node_modules/.bin/jscoverage eachy.js && USE_COVERAGE=1 node_modules/.bin/nodeunit --reporter=lcov test.js | node_modules/.bin/coveralls" | ||
}, | ||
@@ -30,4 +31,6 @@ "repository": { | ||
"devDependencies": { | ||
"tape": "^4.0.0" | ||
"coveralls": "^2.11.4", | ||
"jscoverage": "^0.6.0", | ||
"nodeunit": "^0.9.1" | ||
} | ||
} |
@@ -7,2 +7,3 @@ eachy | ||
[![build status](https://secure.travis-ci.org/mmaelzer/eachy.png)](http://travis-ci.org/mmaelzer/eachy) | ||
[![Coverage Status](https://coveralls.io/repos/mmaelzer/eachy/badge.svg?branch=master&service=github)](https://coveralls.io/github/mmaelzer/eachy?branch=master) | ||
@@ -58,1 +59,24 @@ Install | ||
``` | ||
The MIT License | ||
=============== | ||
Copyright (c) 2015 Michael Maelzer | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
30
test.js
@@ -1,7 +0,8 @@ | ||
var each = require('./'); | ||
var test = require('tape'); | ||
var each = (function() { | ||
return process.env.USE_COVERAGE | ||
? require('./eachy-cov') | ||
: require('./eachy'); | ||
})(); | ||
test('eachy', function(t) { | ||
t.plan(7); | ||
exports.eachyBaseTest = function(t) { | ||
var result = []; | ||
@@ -12,6 +13,10 @@ each([1,2,3], function(n, done) { | ||
}, function(err) { | ||
t.notOk(err, 'If no error is generated, no value passed to the final callback'); | ||
t.notEqual(Boolean(err), true, 'If no error is generated, no value passed to the final callback'); | ||
t.deepEqual([2,4,6], result, 'Iterator function is called'); | ||
}); | ||
t.done(); | ||
}; | ||
exports.eachyAsyncTest = function(t) { | ||
var result2 = []; | ||
@@ -25,4 +30,7 @@ each([4,8,16], function(n, done) { | ||
t.deepEqual([2,4,8], result2, 'Eachy handles async functions properly'); | ||
t.done(); | ||
}); | ||
}; | ||
exports.eachyAsyncErrorTest = function(t) { | ||
var result3 = []; | ||
@@ -42,2 +50,6 @@ each([32, 64, 128], function(n, done) { | ||
t.done(); | ||
}; | ||
exports.eachyIndexTest = function(t) { | ||
var indexes = []; | ||
@@ -60,2 +72,4 @@ var items = [0,1,2]; | ||
}); | ||
}); | ||
t.done(); | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
7258
118
81
3
1