js-insert
v1.1.2
Published
Insert javascript into javascript
Downloads
8
Readme
js-insert
Insert javascript into javascript
Install
Install the module with: npm install js-insert
var insert = require('js-insert');
API
insert.into(<filename>, <matcher>, <insert>);
matcher
options:
Defines the structure of where to insert code into
{
obj: '',
func: '',
nested: {
obj: '',
nested: {
key: ''
}
}
}
value
options:
{
code: {
code: '',
before: {
obj: '',
func: '',
ret: true
},
after: {
}
},
param: {
param: '',
type: 'literal|variable', //variable is default
obj: {
key: '',
value: ''
type: 'literal|variable' //variable is default
},
func: {
param: '',
type: 'literal|variable' //variable is default
},
arr: {
param: '',
type: 'literal|variable' //variable is default
}
}
}
Release History
- v0.0.1, TBD
License
Copyright (c) 2014 Jeffrey Kwan. Licensed under the MIT license.