0.0.2 • Published 10 years ago

notation-to-obj v0.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
10 years ago

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.