Skip to content

Paranoia with Primordials #31

Closed
Closed

Description

@shadowspawn

@ljharb commented in #26

We should probably try to keep this package robust, primordials-style.

I punted and said could we raise a separate issue for that... and here it is!

So, from a state of ignorance, I'll raise some questions:

  1. should we use primordials?
  2. is there a convenient way to make primordials available to current repo code?

I have no experience with the node internals or primordials. I did a quick search for primordials and found:

Activity

  1. ljharb commented on Jan 9, 2022

    @ljharb
    Member

    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)
    
  2. shadowspawn commented on Jan 18, 2022

    @shadowspawn
    CollaboratorAuthor

    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)

  3. shadowspawn commented on Feb 27, 2022

    @shadowspawn
    CollaboratorAuthor

    Closing this as we have added and are using primordials.js to 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.

  4. shadowspawn commented on Jun 18, 2022

    @shadowspawn
    CollaboratorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions