notation-to-obj
v0.0.2
Published
Js Utiltiy to get javascript object from a string notation like "a.b.c"
Downloads
1
Maintainers
Readme
notation-to-obj
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 asprocess.stdout
,bunyan.stdSerializers.err
.- Optional parameter
modulePath
is for specify the loading module path that the same asrequire()
of CommonJS, ifmodulePath
is not given, it will search global object's properties.