{"name":"generator-function","version":"1.0.0","keywords":["generators"],"author":{"name":"Timothy Gu","email":"timothygu99@gmail.com"},"license":"MIT","_id":"generator-function@1.0.0","maintainers":[{"name":"timothygu","email":"timothygu99@gmail.com"}],"homepage":"https://github.com/timothygu/generator-function#readme","bugs":{"url":"https://github.com/timothygu/generator-function/issues"},"dist":{"shasum":"931e79b57b0544c7e0417e65c3764c90d8c8c25d","tarball":"http://registry-npm.ywwl.com/generator-function/download/generator-function-1.0.0.tgz","integrity":"sha512-sMG5cThTMmmKyxx7Vob3Yuy4HqiqL8D8+ZeQToy45FXpI5CA41akXb1zuDHp5n7FDwdWPDX3IWznCAYJAgk9MA==","signatures":[{"sig":"MEUCIGOypTouA42oBtJi7l9DQE2jkz4HAQHr4Tj8uf7ISgIJAiEAziH+uwVNe/iptnUYDgAwmbjdIlfPtH3B5hQ/zYgUN4A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":2331,"noattachment":false,"key":"/generator-function/-/generator-function-1.0.0.tgz"},"main":"index.js","_from":".","_shasum":"931e79b57b0544c7e0417e65c3764c90d8c8c25d","gitHead":"176e0cd3a5ebb004aa666c6eecbe5a968efbddf9","scripts":{"test":"node test"},"_npmUser":{"name":"timothygu","email":"timothygu99@gmail.com"},"repository":{"url":"git+https://github.com/timothygu/generator-function.git","type":"git"},"_npmVersion":"2.14.4","description":"Expose the GeneratorFunction constructor if supported by the runtime","directories":{},"_nodeVersion":"4.1.2","devDependencies":{"testit":"^2.0.2"},"readme":"# generator-function <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nA function that returns the normally hidden `GeneratorFunction` constructor, when available.\n\n## Getting started\n\n```sh\nnpm install --save generator-function\n```\n\n## Usage/Examples\n\n```js\nconst assert = require('assert');\nconst GeneratorFunction = require('generator-function')();\n\nconst fn = new GeneratorFunction('return 1');\n\nassert.equal(fn.toString(), 'function* anonymous(\\n) {\\nreturn 1\\n}');\n\nconst iterator = fn();\n\nassert.deepEqual(iterator.next(), { done: true, value: 1 });\n```\n\n## Tests\n\nClone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/generator-function\n[npm-version-svg]: https://versionbadg.es/TimothyGu/generator-function.svg\n[deps-svg]: https://david-dm.org/TimothyGu/generator-function.svg\n[deps-url]: https://david-dm.org/TimothyGu/generator-function\n[dev-deps-svg]: https://david-dm.org/TimothyGu/generator-function/dev-status.svg\n[dev-deps-url]: https://david-dm.org/TimothyGu/generator-function#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/generator-function.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/generator-function.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/generator-function.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=generator-function\n[codecov-image]: https://codecov.io/gh/TimothyGu/generator-function/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/TimothyGu/generator-function/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/TimothyGu/generator-function\n[actions-url]: https://github.com/TimothyGu/generator-function/actions\n","publish_time":1444541828176,"_cnpm_publish_time":1444541828176,"dist-tags":{"latest":"2.0.1"}}