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.
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 --save @bevry/nodejs-ecmascript-compatibility
- Import:
import * as pkg from ('@bevry/nodejs-ecmascript-compatibility')
- Require:
const pkg = require('@bevry/nodejs-ecmascript-compatibility')
import * as pkg from 'https://unpkg.com/@bevry/nodejs-ecmascript-compatibility@^5.8.0/edition-deno/index.ts'
<script type="module">
import * as pkg from '//cdn.skypack.dev/@bevry/nodejs-ecmascript-compatibility@^5.8.0'
</script>
<script type="module">
import * as pkg from '//unpkg.com/@bevry/nodejs-ecmascript-compatibility@^5.8.0'
</script>
<script type="module">
import * as pkg from '//dev.jspm.io/@bevry/nodejs-ecmascript-compatibility@5.8.0'
</script>
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
Discover the release history by heading on over to the HISTORY.md
file.
Discover how to contribute via the CONTRIBUTING.md
file.
- Benjamin Lupton — Accelerating collaborative wisdom.
- Benjamin Lupton — Accelerating collaborative wisdom.
- 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
- Andrew Nesbitt
- Armen Mkrtchian
- Balsa
- Chad
- Codecov
- dr.dimitru
- Elliott Ditman
- entroniq
- GitHub
- Hunter Beast
- Jean-Luc Geering
- Michael Duane Mooring
- Michael Harry Scepaniak
- Mohammed Shah
- Mr. Henry
- Nermal
- Pleo
- Poonacha Medappa
- Rob Morris
- Robert de Forest
- Sentry
- ServieJS
- Skunk Team
- Syntax
- WriterJohnBuck
Unless stated otherwise all works are:
- Copyright © Benjamin Lupton
and licensed under: