How to use the es5-ext/array/#/contains.call function in es5-ext

To help you get started, we’ve selected a few es5-ext examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github medikoo / log / lib / setup-visibility.js View on Github external
module.exports = function (thresholdLevelName, debugNamespacesTokens) {
	// Resolve intended logging level configuration
	// On this level and above all logs will be exposed
	if (!thresholdLevelName || !includes.call(levels, thresholdLevelName)) {
		thresholdLevelName = "notice";
	}
	var thresholdLevelIndex = levels.indexOf(thresholdLevelName);

	// Resolve namespace based debug logging configuration
	// Applies only to logs below level threshold (will expose logs just for chosen namespaces)
	var debugNamespacesSettings = Object.create(null);
	resolveDebugNamespaces(debugNamespacesTokens, debugNamespacesSettings);
	var debugNamespacesList = Object.keys(debugNamespacesSettings);

	// Apply resolved settings on existing loggers
	levels.forEach(function (levelName, levelIndex) {
		// If logger for given level not initialized yet, skip
		if (!logger.isLevelInitialized(levelName)) return;
		// If logs of given level are meant to be exposed, skip (default is to expose)
		if (levelIndex <= thresholdLevelIndex) return;
github medikoo / dbjs / test / _proto / index.js View on Github external
module.exports = function (t, a) {
	var obj = t.$$create('$$protoTest$$');

	a(getPrototypeOf(obj), t, "Prototype");
	a.deep(keys(obj), [], "Enumerable");
	a(obj._id_, '$$protoTest$$', "Id");
	a(contains.call(t._children_, obj), true, "Child");

	a.deep(obj._prototypes_, [t], "Prototypes");
};
github medikoo / controller-router / index.js View on Github external
if (!data.tokens.every(function (token, index) {
					var pathToken = pathTokens[index];
					if (includes.call(data.matchPositions, index)) {
						if (!token.test(pathToken)) return false;
						args.push(pathToken);
						return true;
					}
					return (token === pathToken);
				})) {
				return false;
github medikoo / controller-router / lib / get-router.js View on Github external
if (!data.tokens.every(function (token, index) {
						var pathToken = pathTokens[index];
						if (includes.call(data.matchPositions, index)) {
							if (!token.test(pathToken)) return false;
							args.push(pathToken);
							return true;
						}
						return (token === pathToken);
					})) {
					return false;
github medikoo / dbjs / _setup / utils / resolve-dynamic-triggers.js View on Github external
result = getter.call(this, function (obj, forceMap) {
			var dupe;
			if (!isNonMapObservable(obj, forceMap)) return obj;
			if (!nu) nu = [];
			else if (contains.call(nu, obj)) dupe = true;
			if (!dupe) {
				nu.push(obj);
				if (obj._makeObservable_) obj._makeObservable_();
			}
			if (!isObservableValue(obj)) return obj;
			obj = obj.value;
			if (dupe) return obj;
			if (isNonMapObservable(obj, forceMap)) {
				nu.push(obj);
				if (obj._makeObservable_) obj._makeObservable_();
			}
			return obj;
		}, arg);
		if (!observed) {
github medikoo / modules-webmake / index.js View on Github external
						return some(parser.extNames, data => contains.call(data, ext));
					})
github medikoo / dbjs / lib / _relation / set-read-only.js View on Github external
has: d(function (value) {
		return contains.call(this._value, this._ns.normalize(value));
	}),
	forEach: d(function (fn/*, thisArg*/) {