
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
core-js-builder
Advanced tools
For some cases could be useful to exclude some core-js
features or generate a polyfill for target engines. This API helps conditionally include or exclude certain parts of core-js
and build for targets. modules
, exclude
and targets
options are specified in the core-js-compat
format.
import builder from 'core-js-builder';
const bundle = await builder({
// entry / module / namespace / an array of them, by default - all `core-js` modules
modules: ['core-js/actual', /^esnext\.reflect\./],
// a blacklist of entries / modules / namespaces, by default - empty list
exclude: [/^es\.math\./, 'es.number.constructor'],
// optional browserslist or core-js-compat format query
targets: '> 0.5%, not dead, ie 9-11',
// shows summary for the bundle, disabled by default
summary: {
// in the console, you could specify required parts or set `true` for enable all of them
console: { size: true, modules: false },
// in the comment in the target file, similarly to `summary.console`
comment: { size: false, modules: true },
},
// output format, 'bundle' by default, can be 'cjs' or 'esm', and in this case
// the result will not be bundled and will contain imports of required modules
format: 'bundle',
// optional target filename, if it's missed a file will not be created
filename: PATH_TO_MY_COREJS_BUNDLE,
});
ℹ️ When using TypeScript, make sure to set esModuleInterop
to true
.
Map
upsert proposal:
WeakMap.prototype.getOrInsertComputed
updated following tc39/proposal-upsert#79Map.prototype.getOrInsert
Map.prototype.getOrInsertComputed
WeakMap.prototype.getOrInsert
WeakMap.prototype.getOrInsertComputed
Symbol
methods for RegExp
on primitive values following tc39/ecma262#3009:
core-js
implementationsString.prototype.matchAll
String.prototype.match
String.prototype.replaceAll
String.prototype.replace
String.prototype.search
String.prototype.split
Uint8Array.prototype.setFromBase64
bug in some of Linux builds of WebKitIterator.prototype.drop
Iterator.prototype.every
Iterator.prototype.filter
Iterator.prototype.find
Iterator.prototype.flatMap
Iterator.prototype.forEach
Iterator.prototype.map
Iterator.prototype.reduce
Iterator.prototype.some
Iterator.prototype.take
AsyncIterator
helpersArray.fromAsync
(due to the lack of async feature detection capability - temporarily, only in own core-js
implementation)AsyncIterator.from
Iterator.prototype.toAsync
undefined
initial parameter in Iterator.prototype.reduce
(see WebKit bug)core-js-compat
and core-js-builder
API:
'intersect'
support for targets.esmodules
(Babel 7 behavior)targets.esmodules: true
(Babel 7 behavior)RegExp.escape
marked as shipped from V8 ~ Chromium 136Error.isError
marked as shipped from FF138Iterator
helpers proposal features marked as supported from Deno 1.38.1 since it seems they were disabled in 1.38.0Iterator.prototype.{ drop, reduce, take }
methods marked as fixed in Bun 1.2.11FAQs
core-js builder
The npm package core-js-builder receives a total of 7,567 weekly downloads. As such, core-js-builder popularity was classified as popular.
We found that core-js-builder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
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.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.