Socket
Socket
Sign inDemoInstall

airbnb-js-shims

Package Overview
Dependencies
91
Maintainers
5
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    airbnb-js-shims

JS language shims used by Airbnb.


Version published
Weekly downloads
1.8M
decreased by-1.97%
Maintainers
5
Install size
3.46 MB
Created
Weekly downloads
 

Package description

What is airbnb-js-shims?

The airbnb-js-shims package is a collection of JavaScript shims and polyfills used by Airbnb. It helps in ensuring that JavaScript code runs smoothly across different environments by providing compatibility for features that may not be available in older browsers or certain environments. This package is particularly useful for developers looking to support a wide range of browsers without having to worry about the availability of modern JavaScript features.

What are airbnb-js-shims's main functionalities?

Array and Object methods

Provides polyfills for modern Array and Object methods like Array.prototype.find and Object.assign, allowing developers to use these methods even in environments that do not natively support them.

[].find(item => item === 2); Object.assign({}, { a: 1 });

Promise support

Includes a polyfill for Promises, enabling asynchronous operations support in environments where Promises are not natively available.

new Promise((resolve, reject) => { resolve('Success'); });

String methods

Adds support for newer String methods such as startsWith and includes, making string manipulation tasks easier and more intuitive.

'hello'.startsWith('he'); 'food'.includes('oo');

Other packages similar to airbnb-js-shims

Readme

Source

airbnb-js-shims Version Badge

JS language shims used by Airbnb.

Just require/import airbnb-js-shims, and the environment will be shimmed.

import 'airbnb-js-shims';

Included shims

Targeting versions

If you do not need to support older browsers, you can pick a subset of ES versions to target. For example, if you don't support pre-ES5 browsers, you can start your shims with ES2015 by requiring/importing the specific target file. This will shim the environment for that version and upward.

import 'airbnb-js-shims/target/es2015';

Included targets

  • airbnb-js-shims/target/es5 (default)
  • airbnb-js-shims/target/es2015
  • airbnb-js-shims/target/es2016
  • airbnb-js-shims/target/es2017
  • airbnb-js-shims/target/es2018
  • airbnb-js-shims/target/es2019
  • airbnb-js-shims/target/es2020

Keywords

FAQs

Last updated on 15 Nov 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc