You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don’t have to use node’s actual primordials facility here - but it’d be easy to migrate to it later if we module-level-cached builtins that were call-bound.
Meaning:
const callBound = require('call-bind/callBound');
const slice = callBound('Array.prototype.slice');
/* and later */
slice(arr)
First draft of primordials done in #37, with another PR coming to generalise the support in a reusable way for other polyfill proof of concept projects for easy adoption in node: #37 (comment)
Activity
ljharb commentedon Jan 9, 2022
We don’t have to use node’s actual primordials facility here - but it’d be easy to migrate to it later if we module-level-cached builtins that were call-bound.
Meaning:
shadowspawn commentedon Jan 18, 2022
First draft of primordials done in #37, with another PR coming to generalise the support in a reusable way for other polyfill proof of concept projects for easy adoption in node: #37 (comment)
shadowspawn commentedon Feb 27, 2022
Closing this as we have added and are using
primordials.jsto allow writing code that will slot into the node environment, which is the main goal.If we want a robust package for use stand-alone, more work to do.
shadowspawn commentedon Jun 18, 2022
Adding a link to the documentation: https://github.com/nodejs/node/blob/main/doc/contributing/primordials.md