How to use the es5-ext/string/#/starts-with.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 / cli-color / test / throbber.js View on Github external
t.on("exit", function () {
			a.ok(out.length > 4, "Interval");
			var isNoColor = Boolean(process.env.NO_COLOR);
			if (isNoColor) {
				a(startsWith.call(out.join(""), "START"), true, "Output");
			} else {
				a(
					startsWith.call(
						out.join(""),
						"START\x1b[31m-\x1b[39m\x1b[31m\b\\\x1b" +
							"[39m\x1b[31m\b|\x1b[39m\x1b[31m\b/\x1b[39m\x1b[31m\b-\x1b[39m"
					),
					true, "Output"
				);
			}
			a(err, "", "No stderr output");
			d();
		});
	}
github medikoo / fs2 / test / readdir.js View on Github external
npaths = paths.filter(function (path) {
				return (
					path !== "one" &&
					path.indexOf(sep + "one") === -1 &&
					!startsWith.call(path, "dthree" + sep + "dthree")
				);
			});
github medikoo / cli-color / test / throbber.js View on Github external
t.on("exit", function () {
			a.ok(out.length > 4, "Interval");
			var isNoColor = Boolean(process.env.NO_COLOR);
			if (isNoColor) {
				a(startsWith.call(out.join(""), "START"), true, "Output");
			} else {
				a(
					startsWith.call(
						out.join(""),
						"START\x1b[31m-\x1b[39m\x1b[31m\b\\\x1b" +
							"[39m\x1b[31m\b|\x1b[39m\x1b[31m\b/\x1b[39m\x1b[31m\b-\x1b[39m"
					),
					true, "Output"
				);
			}
			a(err, "", "No stderr output");
			d();
		});
	}
github medikoo / cli-color / test / throbber.js View on Github external
t.on("exit", function () {
			a.ok(out.length > 4, "Interval");
			a(startsWith.call(out.join(""), "START-\b\\\b|\b/\b-\b"), true, "Output");
			a(err, "", "No stderr output");
			d();
		});
	},
github medikoo / domjs / scripts / dom-to-domjs.js View on Github external
attrs = compact.call(map.call(attrs, function (attr) {
		if (startsWith.call(attr.name, 'data-')) return null;
		return (!re.test(attr.name) ? ('\'' + attr.name + '\'') : attr.name) +
			': ' + text(attr.value);
	}));
github medikoo / dbjs / lib / _proto / own-property-name-set.js View on Github external
getOwnPropertyNames(obj).forEach(function (name) {
		var rel;
		if (!startsWith.call(name, '__')) return;
		if (metaNames.hasOwnProperty(name)) return;
		if (((name === '__value') && (this.obj._type_ === 'relation')) ||
				!(rel = this.obj[name]) || (rel._type_ !== 'relation')) {
			return;
		}
		if (rel._value && (typeof rel._value === 'function') &&
				rel._value.hasOwnProperty('_overridenValue_')) {
			return;
		}
		name = name.slice(2);
		if (this._filter(name)) {
			this[this._serialize(name)] = name;
			++this.count;
		}
	}, this);
	obj.on('update', this._onupdate.bind(this));
github medikoo / fs2 / readdir.js View on Github external
forEach(this.readers, function (newReader, key) {
											if (startsWith.call(key, path)) {
												newReader.files.close();
												if (newReader.dirs) newReader.dirs.close();
												newReader.files.onend(newReader.files.value);
											}
										});
									}
github medikoo / fs2 / copy-dir.js View on Github external
return readlink(filename)(function (linkPath) {
						linkPath = resolve(dirname(filename), linkPath);
						var linkDirname = dirname(linkPath);
						if (
							linkDirname === sourceTop ||
							startsWith.call(linkDirname, sourceTop + sep)
						) {
							linkPath = resolve(destTop, linkPath.slice(sourceTop.length + 1));
						}
						return symlink(
							relative(dirname(resolve(dest, relativePath)), linkPath),
							resolve(dest, relativePath),
							{ intermediate: true }
						);
					});
				});
github medikoo / dbjs / lib / _relation / instance.js View on Github external
getOwnPropertyNames(this).forEach(function (name) {
			var rel;
			if (!startsWith.call(name, '__')) return;
			rel = this[name];
			if (!rel) return;
			if (rel._type_ !== 'relation') return;
			call.call(cb, thisArg, rel, rel._id_, this);
		}, this);
	})
github medikoo / dbjs / is-dbjs-nested-object.js View on Github external
module.exports = function (value/*, owner*/) {
	var owner = arguments[1];
	if (!isDbjsObject(value)) return false;
	if (!value.owner || !value.owner.__id__) return false;
	if (!startsWith.call(value.__id__, value.owner.__id__ + '/')) return false;
	if (owner == null) return true;
	return value.owner === owner;
};