{"_id":"esformatter-var-each","_rev":"217032","name":"esformatter-var-each","description":"Esformatter plugin that converts comma `var` statements into separate `var` statements","dist-tags":{"latest":"2.1.0"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"time":{"modified":"2021-06-03T15:36:51.000Z","created":"2014-11-04T10:58:20.578Z","2.1.0":"2015-08-03T03:27:10.791Z","2.0.1":"2015-06-27T11:16:30.726Z","2.0.0":"2015-06-27T11:03:48.842Z","1.0.0":"2014-11-04T10:58:20.578Z"},"users":{"mpcjazz":true},"author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"repository":{"type":"git","url":"git://github.com/twolfson/esformatter-var-each.git"},"versions":{"2.1.0":{"name":"esformatter-var-each","description":"Esformatter plugin that converts comma `var` statements into separate `var` statements","version":"2.1.0","homepage":"https://github.com/twolfson/esformatter-var-each","author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"repository":{"type":"git","url":"git://github.com/twolfson/esformatter-var-each.git"},"bugs":{"url":"https://github.com/twolfson/esformatter-var-each/issues"},"licenses":[{"type":"UNLICENSE","url":"https://github.com/twolfson/esformatter-var-each/blob/master/UNLICENSE"}],"main":"lib/esformatter-var-each","engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha"},"dependencies":{"rocambole":"~0.3.6","rocambole-token":"~1.2.1"},"devDependencies":{"chai":"~3.0.0","esformatter":"~0.4.3","grunt":"~0.4.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-watch":"~0.4.0","mocha":"~1.11.0"},"keywords":["esformatter","esformatter-plugin","vareach","var-each"],"gitHead":"84407d815c437e1fce2b182bad382784ecaf644a","_id":"esformatter-var-each@2.1.0","_shasum":"cd6f296121c18b460b0d446ed44159800eb39532","_from":".","_npmVersion":"2.11.0","_nodeVersion":"0.10.40","_npmUser":{"name":"twolfson","email":"todd@twolfson.com"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"dist":{"shasum":"cd6f296121c18b460b0d446ed44159800eb39532","size":9598,"noattachment":false,"key":"/esformatter-var-each/-/esformatter-var-each-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/esformatter-var-each/download/esformatter-var-each-2.1.0.tgz"},"directories":{},"publish_time":1438572430791,"_cnpm_publish_time":1438572430791,"_hasShrinkwrap":false},"2.0.1":{"name":"esformatter-var-each","description":"Esformatter plugin that converts comma `var` statements into separate `var` statements","version":"2.0.1","homepage":"https://github.com/twolfson/esformatter-var-each","author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"repository":{"type":"git","url":"git://github.com/twolfson/esformatter-var-each.git"},"bugs":{"url":"https://github.com/twolfson/esformatter-var-each/issues"},"licenses":[{"type":"UNLICENSE","url":"https://github.com/twolfson/esformatter-var-each/blob/master/UNLICENSE"}],"main":"lib/esformatter-var-each","engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha"},"dependencies":{"rocambole":"~0.3.6","rocambole-token":"~1.2.1"},"devDependencies":{"chai":"~3.0.0","esformatter":"~0.4.3","grunt":"~0.4.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-watch":"~0.4.0","mocha":"~1.11.0"},"keywords":["esformatter","esformatter-plugin","vareach","var-each"],"gitHead":"11c7656f7eb4655084331e9ed83c305b773199cf","_id":"esformatter-var-each@2.0.1","_shasum":"645ced3305f496c32d935773fd141e55485e0cc6","_from":".","_npmVersion":"2.11.0","_nodeVersion":"0.10.30","_npmUser":{"name":"twolfson","email":"todd@twolfson.com"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"dist":{"shasum":"645ced3305f496c32d935773fd141e55485e0cc6","size":9275,"noattachment":false,"key":"/esformatter-var-each/-/esformatter-var-each-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/esformatter-var-each/download/esformatter-var-each-2.0.1.tgz"},"directories":{},"publish_time":1435403790726,"_cnpm_publish_time":1435403790726,"_hasShrinkwrap":false},"2.0.0":{"name":"esformatter-var-each","description":"Esformatter plugin that converts comma `var` statements into separate `var` statements","version":"2.0.0","homepage":"https://github.com/twolfson/esformatter-var-each","author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"repository":{"type":"git","url":"git://github.com/twolfson/esformatter-var-each.git"},"bugs":{"url":"https://github.com/twolfson/esformatter-var-each/issues"},"licenses":[{"type":"UNLICENSE","url":"https://github.com/twolfson/esformatter-var-each/blob/master/UNLICENSE"}],"main":"lib/esformatter-var-each","engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha"},"dependencies":{"rocambole":"~0.3.6","rocambole-token":"~1.2.1"},"devDependencies":{"chai":"~3.0.0","esformatter":"~0.4.3","grunt":"~0.4.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-watch":"~0.4.0","mocha":"~1.11.0"},"keywords":["esformatter","esformatter-plugin","vareach","var-each"],"gitHead":"1fb033cc507c2bf5cc5e63f19c47cbcb95ced421","_id":"esformatter-var-each@2.0.0","_shasum":"93a80b1dc2abb39ffb90de96bc19c7de69f42a9c","_from":".","_npmVersion":"2.11.0","_nodeVersion":"0.10.30","_npmUser":{"name":"twolfson","email":"todd@twolfson.com"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"dist":{"shasum":"93a80b1dc2abb39ffb90de96bc19c7de69f42a9c","size":9184,"noattachment":false,"key":"/esformatter-var-each/-/esformatter-var-each-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/esformatter-var-each/download/esformatter-var-each-2.0.0.tgz"},"directories":{},"publish_time":1435403028842,"_cnpm_publish_time":1435403028842,"_hasShrinkwrap":false},"1.0.0":{"name":"esformatter-var-each","description":"Esformatter plugin that converts comma `var` statements into separate `var` statements","version":"1.0.0","homepage":"https://github.com/twolfson/esformatter-var-each","author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"repository":{"type":"git","url":"git://github.com/twolfson/esformatter-var-each.git"},"bugs":{"url":"https://github.com/twolfson/esformatter-var-each/issues"},"licenses":[{"type":"UNLICENSE","url":"https://github.com/twolfson/esformatter-var-each/blob/master/UNLICENSE"}],"main":"lib/esformatter-var-each","engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha"},"dependencies":{"rocambole":"~0.3.6"},"devDependencies":{"esformatter":"~0.4.3","grunt":"~0.4.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-watch":"~0.4.0","mocha":"~1.11.0"},"keywords":["esformatter","esformatter-plugin","vareach","var-each"],"gitHead":"09855ec77a7220fe99db35b8d358ad704addee58","_id":"esformatter-var-each@1.0.0","_shasum":"51be2c319df4fb9c6302b85404cd3bcca80df644","_from":".","_npmVersion":"2.1.3","_nodeVersion":"0.10.32","_npmUser":{"name":"twolfson","email":"todd@twolfson.com"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"dist":{"shasum":"51be2c319df4fb9c6302b85404cd3bcca80df644","size":6803,"noattachment":false,"key":"/esformatter-var-each/-/esformatter-var-each-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/esformatter-var-each/download/esformatter-var-each-1.0.0.tgz"},"directories":{},"publish_time":1415098700578,"_cnpm_publish_time":1415098700578,"_hasShrinkwrap":false}},"readme":"# esformatter-var-each [![Build status](https://travis-ci.org/twolfson/esformatter-var-each.png?branch=master)](https://travis-ci.org/twolfson/esformatter-var-each)\n\n[Esformatter][] plugin that converts comma `var` statements into separate `var` statements\n\nThis was created to make obfuscated scripts more palatable. However, it should be a nice addition to your web development tasks.\n\n[Esformatter]: https://github.com/millermedeiros/esformatter\n\n**Features:**\n\n- Preserves last character of `var's` (e.g. `var a, b;` -> `var a; var b;`)\n- Maintain indentation level of `var's`\n\n## Getting Started\nInstall the module with: `npm install esformatter-var-each`\n\nThen, register it as a plugin and format your JS:\n\n```js\n// Load and register our plugin\nvar esformatter = require('esformatter');\nvar esformatterVarEach = require('esformatter-var-each');\nesformatter.register(esformatterVarEach);\n\n// Format our code\nesformatter.format([\n  'var a = \\'hello\\',',\n  '    b = \\'world\\';'\n].join('\\n'));\n// var a = 'hello';\n// var b = 'world';\n```\n\nAlternatively, load it via `format` directly:\n\n```js\nvar esformatter = require('esformatter');\nesformatter.format([\n  'var a = \\'hello\\',',\n  '    b = \\'world\\';'\n].join('\\n'), {\n  plugins: [\n    'esformatter-var-each'\n  ]\n});\n```\n\n## Documentation\n`esformatter-var-each` exposes `exports.transform` for consumption by `esformatter`.\n\n### `esformatterVarEach.transform(ast)`\nWalk [AST][] and splice in `var` statements.\n\n**Warning: This mutates nodes in place**\n\n- ast `AbstractSyntaxTree` - Abstract syntax tree provided by `esformatter`\n\n[AST]: http://en.wikipedia.org/wiki/Abstract_syntax_tree\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint via [grunt](https://github.com/gruntjs/grunt) and test via `npm test`.\n\n## Donating\nSupport this project and [others by twolfson][gratipay] via [gratipay][].\n\n[![Support via Gratipay][gratipay-badge]][gratipay]\n\n[gratipay-badge]: https://cdn.rawgit.com/gratipay/gratipay-badge/2.x.x/dist/gratipay.png\n[gratipay]: https://www.gratipay.com/twolfson/\n\n## Unlicense\nAs of Nov 03 2014, Todd Wolfson has released this repository and its contents to the public domain.\n\nIt has been released under the [UNLICENSE][].\n\n[UNLICENSE]: UNLICENSE\n","_attachments":{},"homepage":"https://github.com/twolfson/esformatter-var-each","bugs":{"url":"https://github.com/twolfson/esformatter-var-each/issues"}}