bookmarkletter
bookmarkletter convert code to bookmarklets
Installation
npm install bookmarkletter -g
Usage
$ bookmarkletter code.js# or $ cat code.js | bookmarkletter
Output => javascript:(function(){ ...code... })()
API
bookmarkletter allow to use as node module.
npm install bookmarkletter
Use as module
var bookmarkletter = ;var code = "var a = 1;";var result = ;assert;
Options
bookmarkletter
's options
var options = // @type {string} prefix string of compiled code // Default : `javascript:` "prefix-string": "javascript:" // @type {boolean} Add IIFE wrapper, if true // Default : `true` "wrap-anonymous-function": true;var code = "var a = 1;";var result = ;assert;
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
License
MIT
Acknowledgements
Thanks to chriszarate/bookmarkleter