Skip to content

Commit

Permalink
Merge pull request #430 from canjs/landscaper/4217-use-strict
Browse files Browse the repository at this point in the history
Adds use strict. Fixes canjs/canjs#4217
  • Loading branch information
chasenlehara authored Jul 4, 2018
2 parents 451021a + 97686c7 commit d16b60a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
1 change: 1 addition & 0 deletions build.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use strict";
var stealTools = require("steal-tools");

stealTools.export({
Expand Down
1 change: 1 addition & 0 deletions can-util.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use strict";
var namespace = require('can-namespace');

require('./js/js');
Expand Down
1 change: 1 addition & 0 deletions js/assign-non-enumerable/assign-non-enumerable.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use strict";
var setNotEnumerable = require("../set-not-enumerable/set-not-enumerable");

/**
Expand Down
29 changes: 15 additions & 14 deletions js/single-reference/single-reference.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use strict";
var CID = require("can-cid");

var singleReference;
Expand All @@ -24,21 +25,21 @@ function getKeyName(key, extraKey) {
references: globalMap
};
} 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 change: 1 addition & 0 deletions namespace.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
"use strict";
module.exports = require('can-namespace');

0 comments on commit d16b60a

Please sign in to comment.