How to use the es5-ext/lib/String/prototype/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 / dbjs / lib / _internals / relation.js View on Github external
getOwnPropertyNames(this).forEach(function (name) {
			var value;
			if (startsWith.call(name, '__')) {
				if (name === '__value') return;
				value = this[name];
				if (!value._id_) return;
				if (!value.hasOwnProperty('_value')) return;
			} else if (isDigit(name[0]) && this.propertyIsEnumerable(name)) {
				value = this[name];
				if (!value || !value._id_ || !endsWith.call(value._id_, '"')) return;
			} else {
				return;
			}
			cb(value, value._id_, this);
		}, this);
	}),
github medikoo / dbjs / lib / _internals / proto-deep.js View on Github external
module.exports = function self(proto, name) {
	var prop, nuProto;
	if (!startsWith.call(name, '__') || (name === '__value') ||
			!(prop = this[name]) || (this[name] !== this[name.slice(1)])) {
		return;
	}
	nuProto = proto[name] || objProto;
	if (prop.__proto__._children_) remove.call(prop.__proto__._children_, prop);
	prop.__proto__ = nuProto;
	if (nuProto._children_) nuProto._children_.push(prop);
	getOwnPropertyNames(prop).forEach(self.bind(prop, proto[name] || objProto));
	prop._refresh_();
};
github medikoo / dbjs / lib / _internals / validate-completeness.js View on Github external
iterate = function (name) {
		if (done[name]) return;
		done[name] = true;
		if (!startsWith.call(name, '_$') || obj.hasOwnProperty(name) ||
				(ignores && ignores[name.slice(2)])) {
			return;
		}
		prop = proto[name];
		if (!prop || !prop._$required) return;
		if (prop._$required._value && (prop._value == null)) {
			throw new TypeError('undefined is not a value');
		}
	};
	while (proto !== Object.prototype) {
github medikoo / dbjs / lib / types-base / base.js View on Github external
getOwnPropertyNames(this).forEach(function (name) {
			var value;
			if (!startsWith.call(name, '__')) return;
			if (name === '__value') return;
			value = this[name];
			if (!value._id_) return;
			if (!value.hasOwnProperty('_value')) return;
			cb(value, value._id_, this);
		}, this);
	}),
github medikoo / dbjs / lib / base.js View on Github external
iterate = function (name) {
				if (done[name]) return;
				done[name] = true;
				if (!startsWith.call(name, '_$') || this.hasOwnProperty(name) ||
					 (errors && errors[name.slice(2)])) {
					return;
				}
				prop = proto[name];
				if (!isProperty(prop)) return;
				try {
					prop.validateUndefinedExt();
				} catch (e) {
					if (!errors) (errors = {});
					errors[name.slice(2)] = e;
				}
			};
			while (proto !== Object.prototype) {
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') || !(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));