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

extes

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extes

A tiny library that extends native js with some handy tools

  • 2.2.21
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ExtES

This library provides many different tiny and handy tools to provide mechanisms that native js lacks!

A very important note

This library will overwrite or expand the native js objects! Use it carefully...

Use in browser environment

The library is directly provided by JSDeliver. Hence, simply use the following line in browser environment to import and inject all the tools.

import "//cdn.jsdelivr.net/gh/JCloudYu/extes/extes.esm.js";

Use in NodeJS environment

Since that this library is completely written using es module syntax, using this library in NodeJS environment is a little bit tricky. Please follow the following steps to install and use this library!

  1. Install the package via following line.

    npm install extes
    
  2. Download the following loader script from here and name it as loader.mjs

  3. You can use this line in your code to import and inject all the tools.

    import "extes";
    
  4. Run the script using following command

    node --experimental-modules --loader ./loader.mjs [PATH_TO_YOUR_BOOT_SCRIPT]
    

The loader script is used to tell the NodeJS environment to load the scripts ended with .esm.js as es modules not CommonJS modules. The reason why I'm not using .mjs is that I want to make the scripts to be directly identified by web browsers without the need to add additional configuration to make the server respond correct content-type header. 'cause it will be difficult to do that if you're not hosting your own web server!

Injected Tool List

Object

  • Object.defineProperty
  • Object.defineProperties
  • Object.merge
  • Object.generate
  • Object.typeof

Promise

  • Promise.wait
  • Promise.create

Timers

  • setTimeout.create
  • setInterval.create
  • setInterval.idle

Keywords

FAQs

Package last updated on 07 May 2020

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