_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 52 373k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q53500 | errNameFromDesc | train | function errNameFromDesc(desc) {
assert.string(desc, 'desc');
// takes an error description, split on spaces, camel case it correctly,
// then append 'Error' at the end of it.
// e.g., the passed in description is 'Internal Server Error'
// the output is 'InternalServerError'
var pieces ... | javascript | {
"resource": ""
} |
q53501 | makeErrFromCode | train | function makeErrFromCode(statusCode) {
// assert!
assert.number(statusCode, 'statusCode');
assert.equal(statusCode >= 400, true);
// drop the first arg
var args = _.drop(_.toArray(arguments));
var name = helpers.errNameFromCode(statusCode);
var ErrCtor = httpErrors[name];
// assert co... | javascript | {
"resource": ""
} |
q53502 | makeInstance | train | function makeInstance(constructor, constructorOpt, args) {
// pass args to the constructor
function F() { // eslint-disable-line require-jsdoc
return constructor.apply(this, args);
}
F.prototype = constructor.prototype;
// new up an instance, and capture stack trace from the
// passed i... | javascript | {
"resource": ""
} |
q53503 | makeConstructor | train | function makeConstructor(name, defaults) {
assert.string(name, 'name');
assert.optionalObject(defaults, 'defaults');
// code property doesn't have 'Error' in it. remove it.
var defaultCode = name.replace(new RegExp('[Ee]rror$'), '');
var prototypeDefaults = _.assign({}, {
name: name,
... | javascript | {
"resource": ""
} |
q53504 | factory | train | function factory(options) {
assert.optionalObject(options, 'options');
var opts = _.assign({
topLevelFields: false
}, options);
var serializer = new ErrorSerializer(opts);
// rebind the serialize function since this will be lost when we export it
// as a POJO
serializer.serialize =... | javascript | {
"resource": ""
} |
q53505 | CamundaForm | train | function CamundaForm(options) {
if(!options) {
throw new Error('CamundaForm need to be initialized with options.');
}
var done = options.done = options.done || function(err) { if(err) throw err; };
if (options.client) {
this.client = options.client;
}
else {
this.client = new CamSDK.Client(opt... | javascript | {
"resource": ""
} |
q53506 | toArray | train | function toArray(obj) {
var a, arr = [];
for (a in obj) {
arr.push(obj[a]);
}
return arr;
} | javascript | {
"resource": ""
} |
q53507 | ensureEvents | train | function ensureEvents(obj, name) {
obj._events = obj._events || {};
obj._events[name] = obj._events[name] || [];
} | javascript | {
"resource": ""
} |
q53508 | AbstractFormField | train | function AbstractFormField(element, variableManager) {
this.element = $( element );
this.variableManager = variableManager;
this.variableName = null;
this.initialize();
} | javascript | {
"resource": ""
} |
q53509 | train | function (eventName, arg1, arg2) {
var callbacks = this._eventCallbacks[eventName];
if (callbacks) {
for (var i = 0; i < callbacks.length; i++) {
callbacks[i](arg1, arg2);
}
}
} | javascript | {
"resource": ""
} | |
q53510 | Container | train | function Container(registry, options) {
this.registry = registry;
this.owner = options && options.owner ? options.owner : null;
this.cache = _emberMetalDictionary.default(options && options.cache ? options.cache : null);
this.factoryCache = _emberMetalDictionary.default(options && options.factoryCache ?... | javascript | {
"resource": ""
} |
q53511 | train | function (fullName, options) {
_emberMetalDebug.assert('fullName must be a proper full name', this.registry.validateFullName(fullName));
return factoryFor(this, this.registry.normalize(fullName), options);
} | javascript | {
"resource": ""
} | |
q53512 | Registry | train | function Registry(options) {
this.fallback = options && options.fallback ? options.fallback : null;
if (options && options.resolver) {
this.resolver = options.resolver;
if (typeof this.resolver === 'function') {
deprecateResolverFunction(this);
}
}
this.registrations = _embe... | javascript | {
"resource": ""
} |
q53513 | train | function (fullName) {
if (this.resolver && this.resolver.normalize) {
return this.resolver.normalize(fullName);
} else if (this.fallback) {
return this.fallback.normalizeFullName(fullName);
} else {
return fullName;
}
} | javascript | {
"resource": ""
} | |
q53514 | train | function (fullName, options) {
_emberMetalDebug.assert('fullName must be a proper full name', this.validateFullName(fullName));
var source = undefined;
source = options && options.source && this.normalize(options.source);
return has(this, this.normalize(fullName), source);
} | javascript | {
"resource": ""
} | |
q53515 | train | function () {
var _this = this;
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
if (this._bootPromise) {
return this._bootPromise;
}
this._bootPromise = new _emberRuntimeExtRsvp.default.Promise(function (resolve) {
return resolve(_t... | javascript | {
"resource": ""
} | |
q53516 | train | function () {
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
options.base = this;
options.application = this;
return _emberApplicationSystemApplicationInstance.default.create(options);
} | javascript | {
"resource": ""
} | |
q53517 | train | function () {
this._super.apply(this, arguments);
_emberMetal.default.BOOTED = false;
this._booted = false;
this._bootPromise = null;
this._bootResolver = null;
if (_emberRuntimeSystemLazy_load._loaded.application === this) {
_emberRuntimeSystemLazy_load._loaded.application ... | javascript | {
"resource": ""
} | |
q53518 | train | function () {
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
options.base = this;
return _emberApplicationSystemEngineInstance.default.create(options);
} | javascript | {
"resource": ""
} | |
q53519 | train | function () {
var _constructor$buildRegistry;
var registry = this.__registry__ = this.constructor.buildRegistry(this, (_constructor$buildRegistry = {}, _constructor$buildRegistry[GLIMMER] = this[GLIMMER], _constructor$buildRegistry));
return registry;
} | javascript | {
"resource": ""
} | |
q53520 | train | function (fullName) {
var parsedName = this.parseName(fullName);
var description;
if (parsedName.type === 'template') {
return 'template at ' + parsedName.fullNameWithoutType.replace(/\./g, '/');
}
description = parsedName.root + '.' + _emberRuntimeSystemString.classify(parsedNam... | javascript | {
"resource": ""
} | |
q53521 | train | function (parsedName) {
var templateName = parsedName.fullNameWithoutType.replace(/\./g, '/');
return _emberHtmlbarsTemplate_registry.get(templateName) || _emberHtmlbarsTemplate_registry.get(_emberRuntimeSystemString.decamelize(templateName));
} | javascript | {
"resource": ""
} | |
q53522 | train | function (parsedName) {
var className = _emberRuntimeSystemString.classify(parsedName.name);
var factory = _emberMetalProperty_get.get(parsedName.root, className);
if (factory) {
return factory;
}
} | javascript | {
"resource": ""
} | |
q53523 | train | function (type) {
var namespace = _emberMetalProperty_get.get(this, 'namespace');
var suffix = _emberRuntimeSystemString.classify(type);
var typeRegexp = new RegExp(suffix + '$');
var known = _emberMetalDictionary.default(null);
var knownKeys = Object.keys(namespace);
for (var index... | javascript | {
"resource": ""
} | |
q53524 | train | function (typesAdded, typesUpdated) {
var _this = this;
var modelTypes = this.getModelTypes();
var releaseMethods = _emberRuntimeSystemNative_array.A();
var typesToSend;
typesToSend = modelTypes.map(function (type) {
var klass = type.klass;
var wrapped = _this.wrapModelTy... | javascript | {
"resource": ""
} | |
q53525 | train | function (modelName, recordsAdded, recordsUpdated, recordsRemoved) {
var _this2 = this;
var releaseMethods = _emberRuntimeSystemNative_array.A();
var klass = this._nameToClass(modelName);
var records = this.getRecords(klass, modelName);
var release;
var recordUpdated = function (up... | javascript | {
"resource": ""
} | |
q53526 | train | function (modelName, typesUpdated) {
var _this3 = this;
var klass = this._nameToClass(modelName);
var records = this.getRecords(klass, modelName);
var onChange = function () {
typesUpdated([_this3.wrapModelType(klass, modelName)]);
};
var observer = {
didChange: fun... | javascript | {
"resource": ""
} | |
q53527 | train | function () {
var _this5 = this;
var namespaces = _emberRuntimeSystemNative_array.A(_emberRuntimeSystemNamespace.default.NAMESPACES);
var types = _emberRuntimeSystemNative_array.A();
namespaces.forEach(function (namespace) {
for (var key in namespace) {
if (!namespace.hasOwnP... | javascript | {
"resource": ""
} | |
q53528 | train | function (record) {
var recordToSend = { object: record };
recordToSend.columnValues = this.getRecordColumnValues(record);
recordToSend.searchKeywords = this.getRecordKeywords(record);
recordToSend.filterValues = this.getRecordFilterValues(record);
recordToSend.color = this.getRecordColor... | javascript | {
"resource": ""
} | |
q53529 | unlessHelper | train | function unlessHelper(params, hash, options) {
return ifUnless(params, hash, options, !_emberViewsStreamsShould_display.default(params[0]));
} | javascript | {
"resource": ""
} |
q53530 | ComponentNodeManager | train | function ComponentNodeManager(component, isAngleBracket, scope, renderNode, attrs, block, expectElement) {
this.component = component;
this.isAngleBracket = isAngleBracket;
this.scope = scope;
this.renderNode = renderNode;
this.attrs = attrs;
this.block = block;
this.expectElement = expectEl... | javascript | {
"resource": ""
} |
q53531 | getArrayValues | train | function getArrayValues(params) {
var l = params.length;
var out = new Array(l);
for (var i = 0; i < l; i++) {
out[i] = _emberHtmlbarsHooksGetValue.default(params[i]);
}
return out;
} | javascript | {
"resource": ""
} |
q53532 | instrument | train | function instrument(component, callback, context) {
var instrumentName, val, details, end;
// Only instrument if there's at least one subscriber.
if (_emberMetalInstrumentation.subscribers.length) {
if (component) {
instrumentName = component.instrumentName;
} else {
instrumentNa... | javascript | {
"resource": ""
} |
q53533 | makeBoundHelper | train | function makeBoundHelper(fn) {
_emberMetalDebug.deprecate('Using `Ember.HTMLBars.makeBoundHelper` is deprecated. Please refactor to use `Ember.Helper` or `Ember.Helper.helper`.', false, { id: 'ember-htmlbars.make-bound-helper', until: '3.0.0' });
return _emberHtmlbarsHelper.helper(fn);
} | javascript | {
"resource": ""
} |
q53534 | htmlSafe | train | function htmlSafe(str) {
if (str === null || str === undefined) {
str = '';
} else if (typeof str !== 'string') {
str = '' + str;
}
return new _htmlbarsUtil.SafeString(str);
} | javascript | {
"resource": ""
} |
q53535 | train | function () {
_emberMetalDebug.assert('Must pass a valid object to Ember.Binding.disconnect()', !!this._toObj);
// Remove an observer on the object so we're no longer notified of
// changes that should update bindings.
_emberMetalObserver.removeObserver(this._fromObj, this._fromPath, this, 'fro... | javascript | {
"resource": ""
} | |
q53536 | ChainNode | train | function ChainNode(parent, key, value) {
this._parent = parent;
this._key = key;
// _watching is true when calling get(this._parent, this._key) will
// return the value of this node.
//
// It is false for the root of a chain (because we have no parent)
// and for global paths (because the p... | javascript | {
"resource": ""
} |
q53537 | train | function (path) {
var paths = this._paths;
paths[path] = (paths[path] || 0) + 1;
var key = firstKey(path);
var tail = path.slice(key.length + 1);
this.chain(key, tail);
} | javascript | {
"resource": ""
} | |
q53538 | match | train | function match(dependentKey, regexp) {
return _emberMetalComputed.computed(dependentKey, function () {
var value = _emberMetalProperty_get.get(this, dependentKey);
return typeof value === 'string' ? regexp.test(value) : false;
});
} | javascript | {
"resource": ""
} |
q53539 | equal | train | function equal(dependentKey, value) {
return _emberMetalComputed.computed(dependentKey, function () {
return _emberMetalProperty_get.get(this, dependentKey) === value;
});
} | javascript | {
"resource": ""
} |
q53540 | gt | train | function gt(dependentKey, value) {
return _emberMetalComputed.computed(dependentKey, function () {
return _emberMetalProperty_get.get(this, dependentKey) > value;
});
} | javascript | {
"resource": ""
} |
q53541 | gte | train | function gte(dependentKey, value) {
return _emberMetalComputed.computed(dependentKey, function () {
return _emberMetalProperty_get.get(this, dependentKey) >= value;
});
} | javascript | {
"resource": ""
} |
q53542 | lt | train | function lt(dependentKey, value) {
return _emberMetalComputed.computed(dependentKey, function () {
return _emberMetalProperty_get.get(this, dependentKey) < value;
});
} | javascript | {
"resource": ""
} |
q53543 | lte | train | function lte(dependentKey, value) {
return _emberMetalComputed.computed(dependentKey, function () {
return _emberMetalProperty_get.get(this, dependentKey) <= value;
});
} | javascript | {
"resource": ""
} |
q53544 | deprecatingAlias | train | function deprecatingAlias(dependentKey, options) {
return _emberMetalComputed.computed(dependentKey, {
get: function (key) {
_emberMetalDebug.deprecate('Usage of `' + key + '` is deprecated, use `' + dependentKey + '` instead.', false, options);
return _emberMetalProperty_get.get(this, depende... | javascript | {
"resource": ""
} |
q53545 | suspendListener | train | function suspendListener(obj, eventName, target, method, callback) {
return suspendListeners(obj, [eventName], target, method, callback);
} | javascript | {
"resource": ""
} |
q53546 | sendEvent | train | function sendEvent(obj, eventName, params, actions) {
if (!actions) {
var meta = _emberMetalMeta.peekMeta(obj);
actions = meta && meta.matchingListeners(eventName);
}
if (!actions || actions.length === 0) {
return;
}
for (var i = actions.length - 3; i >= 0; i -= 3) {
// loo... | javascript | {
"resource": ""
} |
q53547 | on | train | function on() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var func = args.pop();
var events = args;
func.__ember_listens__ = events;
return func;
} | javascript | {
"resource": ""
} |
q53548 | expandProperties | train | function expandProperties(pattern, callback) {
_emberMetalDebug.assert('A computed property key must be a string', typeof pattern === 'string');
_emberMetalDebug.assert('Brace expanded properties cannot contain spaces, e.g. "user.{firstName, lastName}" should be "user.{firstName,lastName}"', pattern.indexOf(' '... | javascript | {
"resource": ""
} |
q53549 | InjectedProperty | train | function InjectedProperty(type, name) {
this.type = type;
this.name = name;
this._super$Constructor(injectedPropertyGet);
AliasedPropertyPrototype.oneWay.call(this);
} | javascript | {
"resource": ""
} |
q53550 | _instrumentStart | train | function _instrumentStart(name, _payload) {
var listeners = cache[name];
if (!listeners) {
listeners = populateListeners(name);
}
if (listeners.length === 0) {
return;
}
var payload = _payload();
var STRUCTURED_PROFILE = _emberMetalCore.default.STRUCTURED_PROFILE;
var tim... | javascript | {
"resource": ""
} |
q53551 | subscribe | train | function subscribe(pattern, object) {
var paths = pattern.split('.');
var path;
var regex = [];
for (var i = 0, l = paths.length; i < l; i++) {
path = paths[i];
if (path === '*') {
regex.push('[^\\.]*');
} else {
regex.push(path);
}
}
regex = regex.join(... | javascript | {
"resource": ""
} |
q53552 | unsubscribe | train | function unsubscribe(subscriber) {
var index;
for (var i = 0, l = subscribers.length; i < l; i++) {
if (subscribers[i] === subscriber) {
index = i;
}
}
subscribers.splice(index, 1);
cache = {};
} | javascript | {
"resource": ""
} |
q53553 | train | function (key) {
if (this.size === 0) {
return;
}
var values = this._values;
var guid = _emberMetalUtils.guidFor(key);
return values[guid];
} | javascript | {
"resource": ""
} | |
q53554 | train | function (callback /*, ...thisArg*/) {
if (typeof callback !== 'function') {
missingFunction(callback);
}
if (this.size === 0) {
return;
}
var length = arguments.length;
var map = this;
var cb, thisArg;
if (length === 2) {
thisArg = arguments[1]... | javascript | {
"resource": ""
} | |
q53555 | ownMap | train | function ownMap(name, Meta) {
var key = memberProperty(name);
var capitalized = capitalize(name);
Meta.prototype['writable' + capitalized] = function () {
return this._getOrCreateOwnMap(key);
};
Meta.prototype['readable' + capitalized] = function () {
return this[key];
};
} | javascript | {
"resource": ""
} |
q53556 | inheritedMap | train | function inheritedMap(name, Meta) {
var key = memberProperty(name);
var capitalized = capitalize(name);
Meta.prototype['write' + capitalized] = function (subkey, value) {
var map = this._getOrCreateOwnMap(key);
map[subkey] = value;
};
Meta.prototype['peek' + capitalized] = function (su... | javascript | {
"resource": ""
} |
q53557 | inheritedMapOfMaps | train | function inheritedMapOfMaps(name, Meta) {
var key = memberProperty(name);
var capitalized = capitalize(name);
Meta.prototype['write' + capitalized] = function (subkey, itemkey, value) {
var outerMap = this._getOrCreateOwnMap(key);
var innerMap = outerMap[subkey];
if (!innerMap) {
... | javascript | {
"resource": ""
} |
q53558 | ownCustomObject | train | function ownCustomObject(name, Meta) {
var key = memberProperty(name);
var capitalized = capitalize(name);
Meta.prototype['writable' + capitalized] = function (create) {
var ret = this[key];
if (!ret) {
ret = this[key] = create(this.source);
}
return ret;
};
Meta.prot... | javascript | {
"resource": ""
} |
q53559 | train | function (obj, meta) {
// if `null` already, just set it to the new value
// otherwise define property first
if (obj[META_FIELD] !== null) {
if (obj.__defineNonEnumerable) {
obj.__defineNonEnumerable(EMBER_META_PROPERTY);
} else {
Object.defineProperty(obj, META_FIELD, META_DESC)... | javascript | {
"resource": ""
} | |
q53560 | Mixin | train | function Mixin(args, properties) {
this.properties = properties;
var length = args && args.length;
if (length > 0) {
var m = new Array(length);
for (var i = 0; i < length; i++) {
var x = args[i];
if (x instanceof Mixin) {
m[i] = x;
} else {
m[i] = n... | javascript | {
"resource": ""
} |
q53561 | _immediateObserver | train | function _immediateObserver() {
_emberMetalDebug.deprecate('Usage of `Ember.immediateObserver` is deprecated, use `Ember.observer` instead.', false, { id: 'ember-metal.immediate-observer', until: '3.0.0' });
for (var i = 0, l = arguments.length; i < l; i++) {
var arg = arguments[i];
_emberMetalDebu... | javascript | {
"resource": ""
} |
q53562 | _beforeObserver | train | function _beforeObserver() {
for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
args[_key5] = arguments[_key5];
}
var func = args.slice(-1)[0];
var paths;
var addWatchedProperty = function (path) {
paths.push(path);
};
var _paths = arg... | javascript | {
"resource": ""
} |
q53563 | changeProperties | train | function changeProperties(callback, binding) {
beginPropertyChanges();
try {
callback.call(binding);
} finally {
endPropertyChanges.call(binding);
}
} | javascript | {
"resource": ""
} |
q53564 | chain | train | function chain(value, fn, label) {
_emberMetalDebug.assert('Must call chain with a label', !!label);
if (isStream(value)) {
var stream = new _emberMetalStreamsStream.Stream(fn, function () {
return label + '(' + labelFor(value) + ')';
});
stream.addDependency(value);
return strea... | javascript | {
"resource": ""
} |
q53565 | guidFor | train | function guidFor(obj) {
if (obj && obj[GUID_KEY]) {
return obj[GUID_KEY];
}
// special cases where we don't want to add a key to object
if (obj === undefined) {
return '(undefined)';
}
if (obj === null) {
return '(null)';
}
var ret;
var type = typeof obj;
//... | javascript | {
"resource": ""
} |
q53566 | tryInvoke | train | function tryInvoke(obj, methodName, args) {
if (canInvoke(obj, methodName)) {
return args ? applyStr(obj, methodName, args) : applyStr(obj, methodName);
}
} | javascript | {
"resource": ""
} |
q53567 | apply | train | function apply(t, m, a) {
var l = a && a.length;
if (!a || !l) {
return m.call(t);
}
switch (l) {
case 1:
return m.call(t, a[0]);
case 2:
return m.call(t, a[0], a[1]);
case 3:
return m.call(t, a[0], a[1], a[2]);
case 4:
return m.call(t, a[0],... | javascript | {
"resource": ""
} |
q53568 | destroy | train | function destroy(obj) {
var meta = _emberMetalMeta.peekMeta(obj);
var node, nodes, key, nodeObject;
if (meta) {
_emberMetalMeta.deleteMeta(obj);
// remove chainWatchers to remove circular references that would prevent GC
node = meta.readableChains();
if (node) {
NODE_STACK.p... | javascript | {
"resource": ""
} |
q53569 | train | function (controller, _prop) {
var prop = _prop.substr(0, _prop.length - 3);
var delegate = controller._qpDelegate;
var value = _emberMetalProperty_get.get(controller, prop);
delegate(prop, value);
} | javascript | {
"resource": ""
} | |
q53570 | train | function () {
var rootURL = this.rootURL;
_emberMetalDebug.assert('rootURL must end with a trailing forward slash e.g. "/app/"', rootURL.charAt(rootURL.length - 1) === '/');
var implementation = detectImplementation({
location: this.location,
history: this.history,
userAgent:... | javascript | {
"resource": ""
} | |
q53571 | train | function () {
var history = _emberMetalProperty_get.get(this, 'history') || window.history;
_emberMetalProperty_set.set(this, 'history', history);
if (history && 'state' in history) {
this.supportsHistory = true;
}
this.replaceState(this.formatURL(this.getURL()));
} | javascript | {
"resource": ""
} | |
q53572 | train | function () {
var location = _emberMetalProperty_get.get(this, 'location');
var path = location.pathname;
var rootURL = _emberMetalProperty_get.get(this, 'rootURL');
var baseURL = _emberMetalProperty_get.get(this, 'baseURL');
// remove trailing slashes if they exists
rootURL = root... | javascript | {
"resource": ""
} | |
q53573 | train | function (path) {
var state = this.getState();
path = this.formatURL(path);
if (!state || state.path !== path) {
this.pushState(path);
}
} | javascript | {
"resource": ""
} | |
q53574 | train | function (path) {
var state = this.getState();
path = this.formatURL(path);
if (!state || state.path !== path) {
this.replaceState(path);
}
} | javascript | {
"resource": ""
} | |
q53575 | train | function (callback) {
var _this = this;
var guid = _emberMetalUtils.guidFor(this);
_emberViewsSystemJquery.default(window).on('popstate.ember-location-' + guid, function (e) {
// Ignore initial page load popstate event in Chrome
if (!popstateFired) {
popstateFired = true;
... | javascript | {
"resource": ""
} | |
q53576 | generateController | train | function generateController(owner, controllerName, context) {
generateControllerFactory(owner, controllerName, context);
var fullName = 'controller:' + controllerName;
var instance = owner.lookup(fullName);
if (_emberMetalProperty_get.get(instance, 'namespace.LOG_ACTIVE_GENERATION')) {
_emberMet... | javascript | {
"resource": ""
} |
q53577 | train | function (name) {
var route = _containerOwner.getOwner(this).lookup('route:' + name);
if (!route) {
return {};
}
var transition = this.router.router.activeTransition;
var state = transition ? transition.state : this.router.router.state;
var params = {};
_emberMetalAs... | javascript | {
"resource": ""
} | |
q53578 | train | function (value, urlKey, defaultValueType) {
// urlKey isn't used here, but anyone overriding
// can use it to provide deserialization specific
// to a certain query param.
// Use the defaultValueType of the default value (the initial value assigned to a
// controller query param property... | javascript | {
"resource": ""
} | |
q53579 | train | function (oldInfos, newInfos, transition) {
_emberMetalRun_loop.default.once(this, this.trigger, 'willTransition', transition);
if (_emberMetalProperty_get.get(this, 'namespace').LOG_TRANSITIONS) {
_emberMetalLogger.default.log('Preparing to transition from \'' + EmberRouter._routePath(oldInfos) + ... | javascript | {
"resource": ""
} | |
q53580 | train | function (leafRouteName) {
if (this._qpCache[leafRouteName]) {
return this._qpCache[leafRouteName];
}
var map = {};
var qps = [];
this._qpCache[leafRouteName] = {
map: map,
qps: qps
};
var routerjs = this.router;
var recogHandlerInfos = routerjs.... | javascript | {
"resource": ""
} | |
q53581 | queryParamsHelper | train | function queryParamsHelper(params, hash) {
_emberMetalDebug.assert('The `query-params` helper only accepts hash parameters, e.g. (query-params queryParamPropertyName=\'foo\') as opposed to just (query-params \'foo\')', params.length === 0);
return _emberRoutingSystemQuery_params.default.create({
values: ... | javascript | {
"resource": ""
} |
q53582 | max | train | function max(dependentKey) {
return reduceMacro(dependentKey, function (max, item) {
return Math.max(max, item);
}, -Infinity);
} | javascript | {
"resource": ""
} |
q53583 | filterBy | train | function filterBy(dependentKey, propertyKey, value) {
var callback;
if (arguments.length === 2) {
callback = function (item) {
return _emberMetalProperty_get.get(item, propertyKey);
};
} else {
callback = function (item) {
return _emberMetalProperty_get.get(item, propertyK... | javascript | {
"resource": ""
} |
q53584 | setDiff | train | function setDiff(setAProperty, setBProperty) {
if (arguments.length !== 2) {
throw new _emberMetalError.default('setDiff requires exactly two dependent arrays.');
}
return _emberMetalComputed.computed(setAProperty + '.[]', setBProperty + '.[]', function () {
var setA = this.get(setAProperty);
... | javascript | {
"resource": ""
} |
q53585 | collect | train | function collect() {
for (var _len3 = arguments.length, dependentKeys = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
dependentKeys[_key3] = arguments[_key3];
}
return multiArrayMacro(dependentKeys, function () {
var properties = _emberMetalGet_properties.default(this, dependentKeys);
... | javascript | {
"resource": ""
} |
q53586 | copy | train | function copy(obj, deep) {
// fast paths
if ('object' !== typeof obj || obj === null) {
return obj; // can't copy primitives
}
if (_emberRuntimeMixinsCopyable.default && _emberRuntimeMixinsCopyable.default.detect(obj)) {
return obj.copy(deep);
}
return _copy(obj, deep, deep ? [] : ... | javascript | {
"resource": ""
} |
q53587 | createInjectionHelper | train | function createInjectionHelper(type, validator) {
typeValidators[type] = validator;
inject[type] = function (name) {
return new _emberMetalInjected_property.default(type, name);
};
} | javascript | {
"resource": ""
} |
q53588 | validatePropertyInjections | train | function validatePropertyInjections(factory) {
var proto = factory.proto();
var types = [];
var key, desc, validator, i, l;
for (key in proto) {
desc = proto[key];
if (desc instanceof _emberMetalInjected_property.default && types.indexOf(desc.type) === -1) {
types.push(desc.type);
... | javascript | {
"resource": ""
} |
q53589 | train | function () {
_emberMetalDebug.deprecate('`frozenCopy` is deprecated, use `Object.freeze` instead.', false, { id: 'ember-runtime.frozen-copy', until: '3.0.0' });
if (_emberRuntimeMixinsFreezable.Freezable && _emberRuntimeMixinsFreezable.Freezable.detect(this)) {
return _emberMetalProperty_get.get(th... | javascript | {
"resource": ""
} | |
q53590 | train | function () {
var sortKeys = arguments;
return this.toArray().sort(function (a, b) {
for (var i = 0; i < sortKeys.length; i++) {
var key = sortKeys[i];
var propA = _emberMetalProperty_get.get(a, key);
var propB = _emberMetalProperty_get.get(b, key);
// return... | javascript | {
"resource": ""
} | |
q53591 | train | function (objects) {
var _this = this;
_emberMetalProperty_events.beginPropertyChanges(this);
objects.forEach(function (obj) {
return _this.addObject(obj);
});
_emberMetalProperty_events.endPropertyChanges(this);
return this;
} | javascript | {
"resource": ""
} | |
q53592 | train | function (key, value) {
var ret; // = this.reducedProperty(key, value);
if (value !== undefined && ret === undefined) {
ret = this[key] = value;
}
return ret;
} | javascript | {
"resource": ""
} | |
q53593 | typeOf | train | function typeOf(item) {
if (item === null) {
return 'null';
}
if (item === undefined) {
return 'undefined';
}
var ret = TYPE_MAP[toString.call(item)] || 'object';
if (ret === 'function') {
if (_emberRuntimeSystemObject.default.detect(item)) {
ret = 'class';
}
... | javascript | {
"resource": ""
} |
q53594 | train | function (context, callback) {
if (!this.waiters) {
return;
}
if (arguments.length === 1) {
callback = context;
context = null;
}
this.waiters = _emberRuntimeSystemNative_array.A(this.waiters.filter(function (elt) {
return !(elt[0] === context && elt[1] === ... | javascript | {
"resource": ""
} | |
q53595 | protoWrap | train | function protoWrap(proto, name, callback, isAsync) {
proto[name] = function () {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
if (isAsync) {
return callback.apply(this, args);
} else {
... | javascript | {
"resource": ""
} |
q53596 | isolate | train | function isolate(fn, val) {
var value, lastPromise;
// Reset lastPromise for nested helpers
Test.lastPromise = null;
value = fn(val);
lastPromise = Test.lastPromise;
Test.lastPromise = null;
// If the method returned a promise
// return that promise. If not,
// return the last as... | javascript | {
"resource": ""
} |
q53597 | train | function (klass) {
_emberMetalDebug.deprecate('nearestChildOf has been deprecated.', false, { id: 'ember-views.nearest-child-of', until: '3.0.0' });
var view = _emberMetalProperty_get.get(this, 'parentView');
while (view) {
if (_emberMetalProperty_get.get(view, 'parentView') instanceof klass... | javascript | {
"resource": ""
} | |
q53598 | train | function (block, renderNode) {
if (_renderView === undefined) {
_renderView = require('ember-htmlbars/system/render-view');
}
return _renderView.renderHTMLBarsBlock(this, block, renderNode);
} | javascript | {
"resource": ""
} | |
q53599 | train | function (property) {
var view = _emberMetalProperty_get.get(this, 'parentView');
while (view) {
if (property in view) {
return view;
}
view = _emberMetalProperty_get.get(view, 'parentView');
}
} | javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.