Node script extender
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.editorconfig
.eslintignore
.eslintrc
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

Extender

Build Status codecov

Node script extender

Install

$ npm i @acyort/extender -S

Usage

// export.js
module.exports = 'Extends Function'
// init.js
const data = require(require.resolve('./export'))
params.log(data)
const extender = require('@acyort/extender')
const path = require('path')

const params = { log: console.log }
const key = 'params'
const script = path.join(__dirname, 'init.js')

extender(script, params, key) // Extends Function

// Promise use example see the test cases