0.1.1 • Published 7 years ago

function-path v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

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.