Primordials
Install
npm i --save @darkwolf/primordials
Usage
import * as primordials from '@darkwolf/primordials'
const primordials = require('@darkwolf/primordials')
const {
ObjectPrototypeToString,
ObjectPrototypeToStringTag,
SymbolIterator,
ArrayPrototypeSymbolIterator,
MapPrototypeSymbolIterator,
SetPrototypeSymbolIterator,
ArrayIteratorPrototype,
MapIteratorPrototype,
SetIteratorPrototype,
SafeArrayIterator,
SafeMap,
SafeSet
} = primordials
ObjectPrototypeToString({})
ObjectPrototypeToStringTag({})
ArrayIteratorPrototype.next = null
const iterator = ArrayPrototypeSymbolIterator([])
iterator.next()
const safeIterator = new SafeArrayIterator([])
safeIterator.next()
MapIteratorPrototype.next = null
const mapIterator = MapPrototypeSymbolIterator(new Map())
mapIterator.next()
const safeMapIterator = new SafeMap()[SymbolIterator]()
safeMapIterator.next()
SetIteratorPrototype.next = null
const setIterator = SetPrototypeSymbolIterator(new Set())
setIterator.next()
const safeSetIterator = new SafeSet()[SymbolIterator]()
safeSetIterator.next()
Contact Me