Skip to content

How to require another built-in module? #505

Closed

Description

@thestrangedev

I need to use some modules like fs or crypto. It's easy for me to achieve that with Nan by using module varible. Is there any way to do the same?

Activity

  1. gabrielschulhof commented on Jun 27, 2019

    @gabrielschulhof
    Contributor

    You can write a function that accepts another module. Here's a gist with an example.

  2. mhdawson commented on Dec 7, 2020

    @mhdawson
    Member

    Going to close this out as the question was answered and there was no follow on question. Please let us know if that was not the right thing to do.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions