forked from github/cordova-android
Bundle updated node modules
This commit is contained in:
committed by
Nikhil Khandelwal
parent
72bbe9fdf0
commit
d6fe1a65eb
+29
-18
@@ -2,20 +2,24 @@
|
||||
"_args": [
|
||||
[
|
||||
"wrappy@1",
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/inflight"
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\inflight"
|
||||
]
|
||||
],
|
||||
"_from": "wrappy@>=1.0.0 <2.0.0",
|
||||
"_id": "wrappy@1.0.1",
|
||||
"_id": "wrappy@1.0.2",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/wrappy",
|
||||
"_nodeVersion": "0.10.31",
|
||||
"_npmUser": {
|
||||
"email": "i@izs.me",
|
||||
"name": "isaacs"
|
||||
"_nodeVersion": "5.10.1",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005"
|
||||
},
|
||||
"_npmVersion": "2.0.0",
|
||||
"_npmUser": {
|
||||
"email": "kat@sykosomatic.org",
|
||||
"name": "zkat"
|
||||
},
|
||||
"_npmVersion": "3.9.1",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "wrappy",
|
||||
@@ -29,11 +33,11 @@
|
||||
"/inflight",
|
||||
"/once"
|
||||
],
|
||||
"_resolved": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz",
|
||||
"_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739",
|
||||
"_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "wrappy@1",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/inflight",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\inflight",
|
||||
"author": {
|
||||
"email": "i@izs.me",
|
||||
"name": "Isaac Z. Schlueter",
|
||||
@@ -45,23 +49,30 @@
|
||||
"dependencies": {},
|
||||
"description": "Callback wrapping utility",
|
||||
"devDependencies": {
|
||||
"tap": "^0.4.12"
|
||||
"tap": "^2.3.1"
|
||||
},
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"dist": {
|
||||
"shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739",
|
||||
"tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz"
|
||||
"shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f",
|
||||
"tarball": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
|
||||
},
|
||||
"gitHead": "006a8cbac6b99988315834c207896eed71fd069a",
|
||||
"files": [
|
||||
"wrappy.js"
|
||||
],
|
||||
"gitHead": "71d91b6dc5bdeac37e218c2cf03f9ab55b60d214",
|
||||
"homepage": "https://github.com/npm/wrappy",
|
||||
"license": "ISC",
|
||||
"main": "wrappy.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
"email": "i@izs.me",
|
||||
"name": "isaacs"
|
||||
},
|
||||
{
|
||||
"email": "kat@sykosomatic.org",
|
||||
"name": "zkat"
|
||||
}
|
||||
],
|
||||
"name": "wrappy",
|
||||
@@ -72,7 +83,7 @@
|
||||
"url": "git+https://github.com/npm/wrappy.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test/*.js"
|
||||
"test": "tap --coverage test/*.js"
|
||||
},
|
||||
"version": "1.0.1"
|
||||
"version": "1.0.2"
|
||||
}
|
||||
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
var test = require('tap').test
|
||||
var wrappy = require('../wrappy.js')
|
||||
|
||||
test('basic', function (t) {
|
||||
function onceifier (cb) {
|
||||
var called = false
|
||||
return function () {
|
||||
if (called) return
|
||||
called = true
|
||||
return cb.apply(this, arguments)
|
||||
}
|
||||
}
|
||||
onceifier.iAmOnce = {}
|
||||
var once = wrappy(onceifier)
|
||||
t.equal(once.iAmOnce, onceifier.iAmOnce)
|
||||
|
||||
var called = 0
|
||||
function boo () {
|
||||
t.equal(called, 0)
|
||||
called++
|
||||
}
|
||||
// has some rando property
|
||||
boo.iAmBoo = true
|
||||
|
||||
var onlyPrintOnce = once(boo)
|
||||
|
||||
onlyPrintOnce() // prints 'boo'
|
||||
onlyPrintOnce() // does nothing
|
||||
t.equal(called, 1)
|
||||
|
||||
// random property is retained!
|
||||
t.equal(onlyPrintOnce.iAmBoo, true)
|
||||
|
||||
var logs = []
|
||||
var logwrap = wrappy(function (msg, cb) {
|
||||
logs.push(msg + ' wrapping cb')
|
||||
return function () {
|
||||
logs.push(msg + ' before cb')
|
||||
var ret = cb.apply(this, arguments)
|
||||
logs.push(msg + ' after cb')
|
||||
}
|
||||
})
|
||||
|
||||
var c = logwrap('foo', function () {
|
||||
t.same(logs, [ 'foo wrapping cb', 'foo before cb' ])
|
||||
})
|
||||
c()
|
||||
t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ])
|
||||
|
||||
t.end()
|
||||
})
|
||||
Reference in New Issue
Block a user