Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function mixinProperties(mixinsMeta, mixin) {
var guid;
if (mixin instanceof Mixin) {
guid = guidFor(mixin);
if (mixinsMeta[guid]) { return CONTINUE; }
mixinsMeta[guid] = mixin;
return mixin.properties;
} else {
return mixin; // apply anonymous mixin properties
}
}
return tag.get('name').toLowerCase();
});
// find existing tag or create new
if (availableTagNames.contains(tagName.toLowerCase())) {
tagToAdd = availableTags.find((tag) => {
return tag.get('name').toLowerCase() === tagName.toLowerCase();
});
} else {
tagToAdd = this.get('store').createRecord('tag', {
name: tagName
});
// we need to set a UUID so that selectize has a unique value
// it will be ignored when sent to the server
tagToAdd.set('uuid', guidFor(tagToAdd));
}
// push tag onto post relationship
if (tagToAdd) {
this.get('model.tags').insertAt(index, tagToAdd);
}
});
},
var isLast = idx === len-1;
var last, removed;
if (idx>=0 && idx
function _keys(ret, mixin, seen) {
if (seen[guidFor(mixin)]) { return; }
seen[guidFor(mixin)] = true;
if (mixin.properties) {
var props = mixin.properties;
for (var key in props) {
if (props.hasOwnProperty(key)) { ret[key] = true; }
}
} else if (mixin.mixins) {
a_forEach.call(mixin.mixins, (x) => {
_keys(ret, x, seen);
});
}
}
function identity(item) {
let key;
let type = typeof item;
if (type === 'string' || type === 'number') {
key = item;
} else {
key = guidFor(item);
}
return key;
}
export default function decodeEachKey(item, keyPath, index) {
MixinPrototype.detect = function(obj) {
if (!obj) { return false; }
if (obj instanceof Mixin) { return _detect(obj, this, {}); }
var m = obj['__ember_meta__'];
var mixins = m && m.mixins;
if (mixins) {
return !!mixins[guidFor(this)];
}
return false;
};
function removeObserverForContentKey(content, keyName, proxy, idx, loc) {
var objects = proxy._objects;
if (!objects) objects = proxy._objects = {};
var indicies, guid;
while(--loc>=idx) {
var item = content.objectAt(loc);
if (item) {
removeBeforeObserver(item, keyName, proxy, 'contentKeyWillChange');
removeObserver(item, keyName, proxy, 'contentKeyDidChange');
guid = guidFor(item);
indicies = objects[guid];
indicies[indexOf.call(indicies, loc)] = null;
}
}
}