-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MrSocom
committed
Jan 26, 2018
1 parent
bb28b53
commit 0f80405
Showing
7 changed files
with
1,361 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/*can-event-queue@0.17.1#can-event-queue*/ | ||
define([ | ||
'require', | ||
'exports', | ||
'module', | ||
'./map/map' | ||
], function (require, exports, module) { | ||
console.warn('import can-event-queue/map/map instead.'); | ||
module.exports = require('./map/map'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/*can-event-queue@0.17.1#dependency-record/merge*/ | ||
define([ | ||
'require', | ||
'exports', | ||
'module', | ||
'can-reflect' | ||
], function (require, exports, module) { | ||
var canReflect = require('can-reflect'); | ||
var mergeValueDependencies = function mergeValueDependencies(obj, source) { | ||
var sourceValueDeps = source.valueDependencies; | ||
if (sourceValueDeps) { | ||
var destValueDeps = obj.valueDependencies; | ||
if (!destValueDeps) { | ||
destValueDeps = new Set(); | ||
obj.valueDependencies = destValueDeps; | ||
} | ||
canReflect.eachIndex(sourceValueDeps, function (dep) { | ||
destValueDeps.add(dep); | ||
}); | ||
} | ||
}; | ||
var mergeKeyDependencies = function mergeKeyDependencies(obj, source) { | ||
var sourcekeyDeps = source.keyDependencies; | ||
if (sourcekeyDeps) { | ||
var destKeyDeps = obj.keyDependencies; | ||
if (!destKeyDeps) { | ||
destKeyDeps = new Map(); | ||
obj.keyDependencies = destKeyDeps; | ||
} | ||
canReflect.eachKey(sourcekeyDeps, function (keys, obj) { | ||
var entry = destKeyDeps.get(obj); | ||
if (!entry) { | ||
entry = new Set(); | ||
destKeyDeps.set(obj, entry); | ||
} | ||
canReflect.eachIndex(keys, function (key) { | ||
entry.add(key); | ||
}); | ||
}); | ||
} | ||
}; | ||
module.exports = function mergeDependencyRecords(object, source) { | ||
mergeKeyDependencies(object, source); | ||
mergeValueDependencies(object, source); | ||
return object; | ||
}; | ||
}); |
Oops, something went wrong.