notation-to-obj

0.0.2 • Public • Published

notation-to-obj

Build Status

Js utility function to get javascript object from a string notation, useful in fetching objects such as process.stdout that being notated as pure string in config files.

Utililty Function

GetObjectFromName(name: string, modulePath?: string): any
  • name is the string notation of the object, such as process.stdout, bunyan.stdSerializers.err.
  • Optional parameter modulePath is for specify the loading module path that the same as require() of CommonJS, if modulePath is not given, it will search global object's properties.

/notation-to-obj/

    Package Sidebar

    Install

    npm i notation-to-obj

    Weekly Downloads

    3

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • windperson