@bevry/nodejs-ecmascript-compatibility
TypeScript icon, indicating that this package has built-in type declarations

5.8.0 • Public • Published

Node.js ECMAScript Compatibility

Status of the GitHub Workflow: bevry NPM version NPM downloads
GitHub Sponsors donate button ThanksDev donate button Patreon donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button
Discord server badge Twitch community badge

API for the Node.js ECMAScript Compatibility information, such that for a particular Node.js release, you get details on which and how many features of an ECMAScript version are supported.

Usage

Complete API Documentation.

import {
    fetchNodeVersionCompatibility,
    fetchNodeVersionsCompatibility,
    fetchMutualCompatibleESVersionsForNodeVersions,
    fetchExclusiveCompatibleESVersionsForNodeVersions,
    fetchAllCompatibleESVersionsForNodeVersions,
} from '@bevry/nodejs-ecmascript-compatibility'

// fetch the compatibility information for the current node.js version
fetchNodeVersionCompatibility().then(console.log)

// fetch the details for a specific node.js version
fetchNodeVersionCompatibility('4.9.1').then(console.log)

// fetch the details for multiple node.js versions
fetchNodeVersionsCompatibility(['4.9.1', '12.0.0']).then(console.log)

// fetch each ECMAScript version that supports both releases
fetchMutualCompatibleESVersionsForNodeVersions(['4.9.1', '12.0.0']).then(
    console.log,
)

// fetch the minimum ECMAScript versions required to support both releases
fetchExclusiveCompatibleESVersionsForNodeVersions(['4.9.1', '12.0.0']).then(
    console.log,
)

// fetch each ECMAScript version that supports either release
fetchAllCompatibleESVersionsForNodeVersions(['4.9.1', '12.0.0']).then(
    console.log,
)

Node.js versions 15 and 16 will need to use --experimental-global-fetch.

Install

npm

  • Install: npm install --save @bevry/nodejs-ecmascript-compatibility
  • Import: import * as pkg from ('@bevry/nodejs-ecmascript-compatibility')
  • Require: const pkg = require('@bevry/nodejs-ecmascript-compatibility')

Deno

import * as pkg from 'https://unpkg.com/@bevry/nodejs-ecmascript-compatibility@^5.8.0/edition-deno/index.ts'

Skypack

<script type="module">
    import * as pkg from '//cdn.skypack.dev/@bevry/nodejs-ecmascript-compatibility@^5.8.0'
</script>

unpkg

<script type="module">
    import * as pkg from '//unpkg.com/@bevry/nodejs-ecmascript-compatibility@^5.8.0'
</script>

jspm

<script type="module">
    import * as pkg from '//dev.jspm.io/@bevry/nodejs-ecmascript-compatibility@5.8.0'
</script>

Editions

This package is published with the following editions:

  • @bevry/nodejs-ecmascript-compatibility/source/index.ts is TypeScript source code with Import for modules
  • @bevry/nodejs-ecmascript-compatibility/edition-browsers/index.js is TypeScript compiled against ES2022 for web browsers with Import for modules
  • @bevry/nodejs-ecmascript-compatibility aliases @bevry/nodejs-ecmascript-compatibility/edition-es2022/index.js
  • @bevry/nodejs-ecmascript-compatibility/edition-es2022/index.js is TypeScript compiled against ES2022 for Node.js 18 || 20 || 21 with Require for modules
  • @bevry/nodejs-ecmascript-compatibility/edition-es2022-esm/index.js is TypeScript compiled against ES2022 for Node.js 18 || 20 || 21 with Import for modules
  • @bevry/nodejs-ecmascript-compatibility/edition-types/index.d.ts is TypeScript compiled Types with Import for modules
  • @bevry/nodejs-ecmascript-compatibility/edition-deno/index.ts is TypeScript source code made to be compatible with Deno

History

Discover the release history by heading on over to the HISTORY.md file.

Backers

Code

Discover how to contribute via the CONTRIBUTING.md file.

Authors

Maintainers

Contributors

Finances

GitHub Sponsors donate button ThanksDev donate button Patreon donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button

Sponsors

  • Andrew Nesbitt — Software engineer and researcher
  • Balsa — We're Balsa, and we're building tools for builders.
  • Codecov — Empower developers with tools to improve code quality and testing.
  • Poonacha Medappa
  • Rob Morris
  • Sentry — Real-time crash reporting for your web apps, mobile apps, and games.
  • Syntax — Syntax Podcast

Donors

License

Unless stated otherwise all works are:

and licensed under:

Package Sidebar

Install

npm i @bevry/nodejs-ecmascript-compatibility

Weekly Downloads

288

Version

5.8.0

License

Artistic-2.0

Unpacked Size

105 kB

Total Files

15

Last publish

Collaborators

  • bevryme