Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@darkwolf/primordials

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@darkwolf/primordials

Primordials

  • 1.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Primordials

Install

npm i --save @darkwolf/primordials

Usage

// ECMAScript
import * as primordials from '@darkwolf/primordials'
// CommonJS
const primordials = require('@darkwolf/primordials')

const {
  ObjectPrototypeToString,
  ObjectPrototypeToStringTag,
  SymbolIterator,
  ArrayPrototypeSymbolIterator,
  MapPrototypeSymbolIterator,
  SetPrototypeSymbolIterator,
  ArrayIteratorPrototype,
  MapIteratorPrototype,
  SetIteratorPrototype,
  SafeArrayIterator,
  SafeMap,
  SafeSet
} = primordials

ObjectPrototypeToString({}) // => '[object Object]'
ObjectPrototypeToStringTag({}) // => 'Object'

ArrayIteratorPrototype.next = null
const iterator = ArrayPrototypeSymbolIterator([])
iterator.next() // TypeError exception will be thrown
const safeIterator = new SafeArrayIterator([])
safeIterator.next() // => IteratorResult

MapIteratorPrototype.next = null
const mapIterator = MapPrototypeSymbolIterator(new Map())
mapIterator.next() // TypeError exception will be thrown
const safeMapIterator = new SafeMap()[SymbolIterator]()
safeMapIterator.next() // => IteratorResult

SetIteratorPrototype.next = null
const setIterator = SetPrototypeSymbolIterator(new Set())
setIterator.next() // TypeError exception will be thrown
const safeSetIterator = new SafeSet()[SymbolIterator]()
safeSetIterator.next() // => IteratorResult

API Documentation

Contact Me

GitHub: @PavelWolfDark
Telegram: @PavelWolfDark
Email: PavelWolfDark@gmail.com

Keywords

FAQs

Package last updated on 11 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc