can-single-reference
Advanced tools
Comparing version 1.0.0 to 1.2.0
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var stealTools = require("steal-tools"); | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var CID = require("can-cid"); | ||
@@ -27,19 +28,19 @@ | ||
} else {*/ | ||
singleReference = { | ||
// obj is a function ... we need to place `value` on it so we can retreive it | ||
// we can't use a global map | ||
set: function(obj, key, value, extraKey){ | ||
// check if it has a single reference map | ||
obj[getKeyName(key, extraKey)] = value; | ||
}, | ||
singleReference = { | ||
// obj is a function ... we need to place `value` on it so we can retreive it | ||
// we can't use a global map | ||
set: function(obj, key, value, extraKey){ | ||
// check if it has a single reference map | ||
obj[getKeyName(key, extraKey)] = value; | ||
}, | ||
getAndDelete: function(obj, key, extraKey){ | ||
var keyName = getKeyName(key, extraKey); | ||
var value = obj[keyName]; | ||
delete obj[keyName]; | ||
return value; | ||
} | ||
}; | ||
getAndDelete: function(obj, key, extraKey){ | ||
var keyName = getKeyName(key, extraKey); | ||
var value = obj[keyName]; | ||
delete obj[keyName]; | ||
return value; | ||
} | ||
}; | ||
/*}*/ | ||
module.exports = singleReference; |
@@ -1,2 +0,2 @@ | ||
/*can-single-reference@0.0.0#can-single-reference*/ | ||
/*can-single-reference@1.1.0#can-single-reference*/ | ||
define([ | ||
@@ -9,2 +9,3 @@ 'require', | ||
(function (global, require, exports, module) { | ||
'use strict'; | ||
var CID = require('can-cid'); | ||
@@ -11,0 +12,0 @@ var singleReference; |
@@ -1,2 +0,3 @@ | ||
/*can-single-reference@0.0.0#can-single-reference*/ | ||
/*can-single-reference@1.1.0#can-single-reference*/ | ||
'use strict'; | ||
var CID = require('can-cid'); | ||
@@ -3,0 +4,0 @@ var singleReference; |
@@ -0,1 +1,33 @@ | ||
/*[process-shim]*/ | ||
(function(global, env) { | ||
// jshint ignore:line | ||
if (typeof process === "undefined") { | ||
global.process = { | ||
argv: [], | ||
cwd: function() { | ||
return ""; | ||
}, | ||
browser: true, | ||
env: { | ||
NODE_ENV: env || "development" | ||
}, | ||
version: "", | ||
platform: | ||
global.navigator && | ||
global.navigator.userAgent && | ||
/Windows/.test(global.navigator.userAgent) | ||
? "win" | ||
: "" | ||
}; | ||
} | ||
})( | ||
typeof self == "object" && self.Object == Object | ||
? self | ||
: typeof process === "object" && | ||
Object.prototype.toString.call(process) === "[object process]" | ||
? global | ||
: window, | ||
"development" | ||
); | ||
/*[global-shim-start]*/ | ||
@@ -135,3 +167,3 @@ (function(exports, global, doEval) { | ||
/*can-single-reference@0.0.0#can-single-reference*/ | ||
/*can-single-reference@1.1.0#can-single-reference*/ | ||
define('can-single-reference', [ | ||
@@ -144,2 +176,3 @@ 'require', | ||
(function (global, require, exports, module) { | ||
'use strict'; | ||
var CID = require('can-cid'); | ||
@@ -146,0 +179,0 @@ var singleReference; |
{ | ||
"name": "can-single-reference", | ||
"version": "1.0.0", | ||
"version": "1.2.0", | ||
"description": "Assign a value to a function that can be collected later", | ||
@@ -5,0 +5,0 @@ "homepage": "http://canjs.com", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
16512
319
2