1.1.2 • Published 10 years ago

js-insert v1.1.2

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

js-insert Build Status

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.

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago