function-path

0.1.1 • Public • Published

Function Path

npm license CircleCI Coveralls

With function-path you can deep link into functions and nested objects.

Install

$ > yarn add function-path
$ > npm install function-path

Usage

Let's say you have a file scripts/output.js with the following contents:

function handler () {
  return 'yeah'
}
 
module.exports.nested = { handler }

You can access the handler function using function-path with scripts/output.nested.handler:

const handler = require('function-path').require('scripts/output.nested.handler')

License

Feel free to use the code, it's released using the MIT license.

Contribution

You are more than welcome to contribute to this project! 😘 🙆

To make sure you have a pleasant experience, please read the code of conduct. It outlines core values and believes and will make working together a happier experience.

Readme

Keywords

none

Package Sidebar

Install

npm i function-path

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • sbstjn