Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSocom committed Jan 26, 2018
1 parent bb28b53 commit 0f80405
Show file tree
Hide file tree
Showing 7 changed files with 1,361 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dist/amd/can-event-queue.js
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');
});
47 changes: 47 additions & 0 deletions dist/amd/dependency-record/merge.js
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;
};
});
Loading

0 comments on commit 0f80405

Please sign in to comment.