{"versions":{"1.0.5":{"name":"flow-remove-types-no-whitespace","version":"1.0.5","description":"Removes Flow type annotations from JavaScript files with speed and simplicity.","author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"license":"BSD-3-Clause","main":"index.js","bin":{"flow-remove-types":"./flow-remove-types","flow-node":"./flow-node"},"homepage":"https://github.com/leebyron/flow-remove-types","bugs":{"url":"https://github.com/leebyron/flow-remove-types/issues"},"repository":{"type":"git","url":"git+ssh://git@github.com/leebyron/flow-remove-types.git"},"scripts":{"test":"DIFF=$(./flow-remove-types test/source.js | diff test/expected.js -); if [ -n \"$DIFF\" ]; then echo \"$DIFF\"; exit 1; fi; RES=$(node -e 'require(\"./register\");require(\"./test/test-node-module.js\")'); if [ \"$RES\" != 42 ]; then echo 'Node register hook failed'; exit 1; fi; FLOW_NODE=$(./flow-node ./test/test-node-module.js); if [ \"$FLOW_NODE\" != 42 ]; then echo 'flow-node failed'; exit 1; fi;","test-update":"./flow-remove-types test/source.js > test/expected.js"},"keywords":["flow","flowtype","compiler","transpiler","transform","es6"],"dependencies":{"babylon":"^6.8.4","magic-string":"^0.16.0"},"gitHead":"15ccbe3c40f77a7da9acc7cd826f5e85313ff541","_id":"flow-remove-types-no-whitespace@1.0.5","_shasum":"3d297985a0bed5197b8fb0cbe89ec163f8dea9eb","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"anonymous","email":"yyx990803@gmail.com"},"maintainers":[{"name":"anonymous","email":"yyx990803@gmail.com"}],"dist":{"shasum":"3d297985a0bed5197b8fb0cbe89ec163f8dea9eb","size":7941,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/flow-remove-types-no-whitespace/-/flow-remove-types-no-whitespace-1.0.5.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/flow-remove-types-no-whitespace-1.0.5.tgz_1475616605467_0.9814212745986879"},"directories":{},"publish_time":1475616607381,"_cnpm_publish_time":1475616607381,"_hasShrinkwrap":false,"contributors":[]},"1.0.4":{"name":"flow-remove-types-no-whitespace","version":"1.0.4","description":"Removes Flow type annotations from JavaScript files with speed and simplicity.","author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"license":"BSD-3-Clause","main":"index.js","bin":{"flow-remove-types":"./flow-remove-types","flow-node":"./flow-node"},"homepage":"https://github.com/leebyron/flow-remove-types","bugs":{"url":"https://github.com/leebyron/flow-remove-types/issues"},"repository":{"type":"git","url":"git+ssh://git@github.com/leebyron/flow-remove-types.git"},"scripts":{"test":"DIFF=$(./flow-remove-types test/source.js | diff test/expected.js -); if [ -n \"$DIFF\" ]; then echo \"$DIFF\"; exit 1; fi; RES=$(node -e 'require(\"./register\");require(\"./test/test-node-module.js\")'); if [ \"$RES\" != 42 ]; then echo 'Node register hook failed'; exit 1; fi; FLOW_NODE=$(./flow-node ./test/test-node-module.js); if [ \"$FLOW_NODE\" != 42 ]; then echo 'flow-node failed'; exit 1; fi;","test-update":"./flow-remove-types test/source.js > test/expected.js"},"keywords":["flow","flowtype","compiler","transpiler","transform","es6"],"dependencies":{"babylon":"^6.8.4","magic-string":"^0.16.0"},"gitHead":"2b036b473edc2762a1b694acd162364b03ecd094","_id":"flow-remove-types-no-whitespace@1.0.4","_shasum":"319427361d648e83d48ae88892a46c7b44145c9f","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"anonymous","email":"yyx990803@gmail.com"},"maintainers":[{"name":"anonymous","email":"yyx990803@gmail.com"}],"dist":{"shasum":"319427361d648e83d48ae88892a46c7b44145c9f","size":7941,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/flow-remove-types-no-whitespace/-/flow-remove-types-no-whitespace-1.0.4.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/flow-remove-types-no-whitespace-1.0.4.tgz_1475082510697_0.4694942142814398"},"directories":{},"publish_time":1475082511225,"_cnpm_publish_time":1475082511225,"_hasShrinkwrap":false,"contributors":[]},"1.0.3":{"name":"flow-remove-types-no-whitespace","version":"1.0.3","description":"Removes Flow type annotations from JavaScript files with speed and simplicity.","author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"license":"BSD-3-Clause","main":"index.js","bin":{"flow-remove-types":"./flow-remove-types","flow-node":"./flow-node"},"homepage":"https://github.com/leebyron/flow-remove-types","bugs":{"url":"https://github.com/leebyron/flow-remove-types/issues"},"repository":{"type":"git","url":"git+ssh://git@github.com/leebyron/flow-remove-types.git"},"scripts":{"test":"DIFF=$(./flow-remove-types test/source.js | diff test/expected.js -); if [ -n \"$DIFF\" ]; then echo \"$DIFF\"; exit 1; fi; RES=$(node -e 'require(\"./register\");require(\"./test/test-node-module.js\")'); if [ \"$RES\" != 42 ]; then echo 'Node register hook failed'; exit 1; fi; FLOW_NODE=$(./flow-node ./test/test-node-module.js); if [ \"$FLOW_NODE\" != 42 ]; then echo 'flow-node failed'; exit 1; fi;","test-update":"./flow-remove-types test/source.js > test/expected.js"},"keywords":["flow","flowtype","compiler","transpiler","transform","es6"],"dependencies":{"babylon":"^6.8.4","magic-string":"^0.16.0"},"gitHead":"35f029d7a3e4a497fa2620f8a4929ebb78a34d13","_id":"flow-remove-types-no-whitespace@1.0.3","_shasum":"1e2fe4080b4298f529571919eaaa2fdbaf7928b3","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"anonymous","email":"yyx990803@gmail.com"},"maintainers":[{"name":"anonymous","email":"yyx990803@gmail.com"}],"dist":{"shasum":"1e2fe4080b4298f529571919eaaa2fdbaf7928b3","size":7925,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/flow-remove-types-no-whitespace/-/flow-remove-types-no-whitespace-1.0.3.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/flow-remove-types-no-whitespace-1.0.3.tgz_1474516925117_0.0795759940519929"},"directories":{},"publish_time":1474516925791,"_cnpm_publish_time":1474516925791,"_hasShrinkwrap":false,"contributors":[]}},"dist-tags":{"latest":"1.0.5"},"name":"flow-remove-types-no-whitespace","time":{"modified":"2022-01-26T22:55:29.295Z","created":"2022-01-26T22:55:29.295Z","1.0.5":"2016-10-04T21:30:07.381Z","1.0.4":"2016-09-28T17:08:31.225Z","1.0.3":"2016-09-22T04:02:05.791Z"},"readme":"flow-remove-types\n=================\n\n[![npm](https://img.shields.io/npm/v/flow-remove-types.svg?maxAge=86400)](https://www.npmjs.com/package/flow-remove-types)\n[![Build Status](https://img.shields.io/travis/leebyron/flow-remove-types.svg?style=flat&label=travis&branch=master)](https://travis-ci.org/leebyron/flow-remove-types)\n\nTurn your JavaScript with [Flow](https://flowtype.org/) type annotations into\nstandard JavaScript in an instant with no configuration and minimal setup.\n\n[Flow](https://flowtype.org/) provides static type checking to JavaScript which\ncan both help find and detect bugs long before code is deployed and can make\ncode easier to read and more self-documenting. The Flow tool itself only reads\nand analyzes code. Running code with Flow type annotations requires first\nremoving the annotations which are non-standard JavaScript. Typically this is\ndone via adding a plugin to your [Babel](https://babeljs.io/) configuration,\nhowever Babel may be overkill if you're only targetting modern versions of\nNode.js or just not using the modern ES2015 features that may not be in\nevery browser.\n\n`flow-remove-types` is a faster, simpler, zero-configuration alternative with\nminimal dependencies for super-fast `npm install` time.\n\n\n## Get Started!\n\nUse the command line:\n\n```\nnpm install --global flow-remove-types\n```\n\n```\nflow-remove-types --help\nflow-remove-types input.js > output.js\n```\n\nOr the JavaScript API:\n\n```\nnpm install flow-remove-types\n```\n\n```js\nvar flowRemoveTypes = require('flow-remove-types');\nvar fs = require('fs');\n\nvar input = fs.readFileSync('input.js', 'utf8');\nvar output = flowRemoveTypes(input);\nfs.writeFileSync('output.js', output);\n```\n\n\n## Use in Build Systems:\n\n**Rollup**: [`rollup-plugin-flow`](https://github.com/leebyron/rollup-plugin-flow)\n\n**Browserify:** [`unflowify`](https://github.com/leebyron/unflowify)\n\n\n## Use `flow-node`\n\nWherever you use `node` you can substitute `flow-node` and have a super fast\nflow-types aware evaluator or REPL.\n\n```\n$ flow-node\n> var x: number = 42\nundefined\n> x\n42\n```\n\n\n## Use the require hook\n\nUsing the require hook allows you to automatically compile files on the fly when\nrequiring in node:\n\n```js\nrequire('flow-remove-types/register')\nrequire('./some-module-with-flow-type-syntax')\n```\n\n\n## Dead-Simple Transforms\n\nWhen `flow-remove-types` removes Flow types, it replaces them with whitespace.\nThis ensures that the transformed output has exactly the same number of lines\nand characters and that all character offsets remain the same. This removes the\nneed for sourcemaps, maintains legible output, and ensures that it is super easy\nto include `flow-remove-types` at any point in your existing build tools.\n\nBuilt atop the excellent [`babylon`](https://github.com/babel/babylon) parser,\n`flow-remove-types` shares the same parse rules as the source of truth as\nFlow Babel plugins. It also passes through other common non-standard syntax such\nas [JSX](https://facebook.github.io/jsx/) and experimental ECMAScript proposals.\n\n**Before:**\n\n```js\nimport SomeClass from 'some-module'\nimport type { SomeInterface } from 'some-module'\n\nexport class MyClass<T> extends SomeClass implements SomeInterface {\n\n  value: T\n\n  constructor(value: T) {\n    this.value = value\n  }\n\n  get(): T {\n    return this.value\n  }\n\n}\n\n```\n\n**After:**\n\n```js\nimport SomeClass from 'some-module'\n\n\nexport class MyClass    extends SomeClass                          {\n\n\n\n  constructor(value   ) {\n    this.value = value\n  }\n\n  get()    {\n    return this.value\n  }\n\n}\n```\n\n\n## Performance\n\n### Install:\n\nInstalling via `npm` from an empty project:\n\n**flow-remove-types:**\n\n```\ntime npm install flow-remove-types\n\nreal  0m3.193s\nuser  0m1.643s\nsys   0m0.775s\n```\n\n**Babel:**\n\n```\ntime npm install babel-cli babel-plugin-transform-flow-strip-types\n\nreal  0m23.200s\nuser  0m10.395s\nsys   0m4.238s\n```\n\n### Transform:\n\nTransforming a directory of 20 files of 100 lines each:\n\n**flow-remove-types:**\n\n```\ntime flow-remove-types src/ --out-dir dest/\n\nreal  0m0.431s\nuser  0m0.436s\nsys   0m0.068s\n```\n\n**Babel:**\n\n```\ntime babel src/ --out-dir dest/\n\nreal  0m1.074s\nuser  0m1.092s\nsys   0m0.149s\n```","users":{}}