How to use the es6-symbol.toStringTag function in es6-symbol

To help you get started, we’ve selected a few es6-symbol 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 / es6-map / lib / iterator.js View on Github external
if (setPrototypeOf) setPrototypeOf(MapIterator, Iterator);

MapIterator.prototype = Object.create(Iterator.prototype, {
	constructor: d(MapIterator),
	_resolve: d(function (i) {
		if (this.__kind__ === 'value') return this.__values__[i];
		if (this.__kind__ === 'key') return this.__list__[i];
		return [this.__list__[i], this.__values__[i]];
	}),
	_unBind: d(function () {
		this.__values__ = null;
		unBind.call(this);
	}),
	toString: d(function () { return '[object Map Iterator]'; })
});
Object.defineProperty(MapIterator.prototype, toStringTagSymbol,
	d('c', 'Map Iterator'));
github medikoo / es6-map / lib / primitive-iterator.js View on Github external
unBind.call(this);
	}),
	toString: d(function () { return '[object Map Iterator]'; })
}, autoBind({
	_onAdd: d(function (key) { this.__list__.push(key); }),
	_onDelete: d(function (key) {
		var index = this.__list__.lastIndexOf(key);
		if (index < this.__nextIndex__) return;
		this.__list__.splice(index, 1);
	}),
	_onClear: d(function () {
		clear.call(this.__list__);
		this.__nextIndex__ = 0;
	})
})));
Object.defineProperty(PrimitiveMapIterator.prototype, toStringTagSymbol,
	d('c', 'Map Iterator'));
github angelozerr / tern.java / core / ternjs / node_modules / tern-eslint / node_modules / eslint / node_modules / es6-map / lib / iterator.js View on Github external
if (setPrototypeOf) setPrototypeOf(MapIterator, Iterator);

MapIterator.prototype = Object.create(Iterator.prototype, {
	constructor: d(MapIterator),
	_resolve: d(function (i) {
		if (this.__kind__ === 'value') return this.__values__[i];
		if (this.__kind__ === 'key') return this.__list__[i];
		return [this.__list__[i], this.__values__[i]];
	}),
	_unBind: d(function () {
		this.__values__ = null;
		unBind.call(this);
	}),
	toString: d(function () { return '[object Map Iterator]'; })
});
Object.defineProperty(MapIterator.prototype, toStringTagSymbol,
	d('c', 'Map Iterator'));
github angelozerr / tern.java / core / ternjs / node_modules / tern-eslint / node_modules / eslint / node_modules / es6-map / lib / primitive-iterator.js View on Github external
unBind.call(this);
	}),
	toString: d(function () { return '[object Map Iterator]'; })
}, autoBind({
	_onAdd: d(function (key) { this.__list__.push(key); }),
	_onDelete: d(function (key) {
		var index = this.__list__.lastIndexOf(key);
		if (index < this.__nextIndex__) return;
		this.__list__.splice(index, 1);
	}),
	_onClear: d(function () {
		clear.call(this.__list__);
		this.__nextIndex__ = 0;
	})
})));
Object.defineProperty(PrimitiveMapIterator.prototype, toStringTagSymbol,
	d('c', 'Map Iterator'));
github medikoo / es6-set / lib / primitive-iterator.js View on Github external
unBind.call(this);
	}),
	toString: d(function () { return '[object Set Iterator]'; })
}, autoBind({
	_onAdd: d(function (key) { this.__list__.push(key); }),
	_onDelete: d(function (key) {
		var index = this.__list__.lastIndexOf(key);
		if (index < this.__nextIndex__) return;
		this.__list__.splice(index, 1);
	}),
	_onClear: d(function () {
		clear.call(this.__list__);
		this.__nextIndex__ = 0;
	})
})));
Object.defineProperty(PrimitiveSetIterator.prototype, toStringTagSymbol,
	d('c', 'Set Iterator'));