{"_id":"esformatter-var-each","_rev":"9-11cd4792f64ce738b1093dd26b599cde","name":"esformatter-var-each","description":"Esformatter plugin that converts comma `var` statements into separate `var` statements","dist-tags":{"latest":"2.1.0"},"versions":{"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","tarball":"https://registry.npmjs.org/esformatter-var-each/-/esformatter-var-each-1.0.0.tgz","integrity":"sha512-6p9v4AZFTlo6O14bXbWv86s5ykgboH961hfuWzAPzIFme8RzgYb8qcTUGbJ35RtMPVnf+G+zmWUTZyneIVSACg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDVXu5e8ZvRrjLIsKqb7fKoFJqJ8uJcNzsQbJgnjy3u9AiB5sSC7O+Di0t7r9qO03nIZATHYl753uRg6HFvNprPA8A=="}]}},"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","tarball":"https://registry.npmjs.org/esformatter-var-each/-/esformatter-var-each-2.0.0.tgz","integrity":"sha512-R9AXvXedInOuDQyxZXQtQMF8Z9ivB4V+qQ5ethJNtmAY5ujl7QvwMf4ck8nYaMNj40YGKUDEu14VHwgJOhhy2A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBIj/GdUM1g2N73FZvefAxbQ2YZEZUnmYngKwCNJJwFaAiB5u8E9SGAjetFPyl4SWTnTNY7p8uByTfbwPCnSJ0lvDg=="}]}},"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","tarball":"https://registry.npmjs.org/esformatter-var-each/-/esformatter-var-each-2.0.1.tgz","integrity":"sha512-DHSKBipuxhuD/574d7nmny1yVEAGo9Gp/euCGzTAFmeCO9QZdftCiIs7KtTt3AH/kRo7OcyAOoeUdj+u+N0xLQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8vsKbtidHAkJbwXKBXEVYjQ6V9JdFU+B46ZJ/d+EUhAIgAlZ2WYziuLEj6nm3GptRc9YNCHNNy9Zz3H4c/VHbXmw="}]}},"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","tarball":"https://registry.npmjs.org/esformatter-var-each/-/esformatter-var-each-2.1.0.tgz","integrity":"sha512-aczBJiQ7nzpiIbG8v1cj14fuXeBOYrGMkiDNZMXZM21AdCvsBLPHdx9vExmPcOYOdOrhAsdtbdY1ePIiAKES8Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQ8W3YerRHCfSFkJDJ8HehVK6QWVBzwDBpYhG7Q3ReCgIgRGw4lSbW4a7TfQhNwBxx5ooQkJC/+MBY+/7cXDZjamk="}]}}},"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","maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"time":{"modified":"2022-06-17T17:44:02.612Z","created":"2014-11-04T10:58:20.578Z","1.0.0":"2014-11-04T10:58:20.578Z","2.0.0":"2015-06-27T11:03:48.842Z","2.0.1":"2015-06-27T11:16:30.726Z","2.1.0":"2015-08-03T03:27:10.791Z"},"homepage":"https://github.com/twolfson/esformatter-var-each","keywords":["esformatter","esformatter-plugin","vareach","var-each"],"repository":{"type":"git","url":"git://github.com/twolfson/esformatter-var-each.git"},"author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"bugs":{"url":"https://github.com/twolfson/esformatter-var-each/issues"},"readmeFilename":"README.md"}