{"id":16718664,"url":"https://github.com/planeshifter/detect-generator-support","last_synced_at":"2026-01-02T16:35:54.026Z","repository":{"id":148376680,"uuid":"52031663","full_name":"Planeshifter/detect-generator-support","owner":"Planeshifter","description":"Detect native generator function support.","archived":false,"fork":false,"pushed_at":"2016-02-19T01:46:55.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-23T09:51:27.229Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Planeshifter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-18T19:11:56.000Z","updated_at":"2016-02-19T00:53:11.000Z","dependencies_parsed_at":"2023-05-04T14:30:47.155Z","dependency_job_id":null,"html_url":"https://github.com/Planeshifter/detect-generator-support","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planeshifter%2Fdetect-generator-support","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planeshifter%2Fdetect-generator-support/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planeshifter%2Fdetect-generator-support/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planeshifter%2Fdetect-generator-support/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Planeshifter","download_url":"https://codeload.github.com/Planeshifter/detect-generator-support/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243715279,"owners_count":20335893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T21:38:02.186Z","updated_at":"2026-01-02T16:35:53.963Z","avatar_url":"https://github.com/Planeshifter.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"Generator Support\n===\n[![NPM version][npm-image]][npm-url] [![Build Status][build-image]][build-url] [![Coverage Status][coverage-image]][coverage-url] [![Dependencies][dependencies-image]][dependencies-url]\n\n\u003e Detect native [`generator function`][generator-function] support.\n\n\n## Installation\n\n``` bash\n$ npm install detect-generator-support\n```\n\n\n## Usage\n\n``` javascript\nvar areGeneratorsSupported = require( 'detect-generator-support' );\n```\n\n#### areGeneratorsSupported()\n\nDetects if a runtime environment supports ES2015 [`generator functions`][generator-function], i.e. `function*()`.\n\n``` javascript\nvar bool = areGeneratorsSupported();\n// returns \u003cBoolean\u003e\n```\n\n\n## Examples\n\n``` javascript\nvar areGeneratorsSupported = require( 'detect-generator-support' );\n\nvar bool = areGeneratorsSupported();\nif ( bool ) {\n\tconsole.log( 'Environment has native generator function support.' );\n} else {\n\tconsole.log( 'Environment lacks native generator function support.' );\n}\n```\n\nTo run the example code from the top-level application directory,\n\n``` bash\n$ node ./examples/index.js\n```\n\n\n---\n## CLI\n\n### Installation\n\nTo use the module as a general utility, install the module globally\n\n``` bash\n$ npm install -g detect-generator-support\n```\n\n\n### Usage\n\n``` bash\nUsage: hasgenerators [options]\n\nOptions:\n\n  -h,    --help                Print this message.\n  -V,    --version             Print the package version.\n```\n\n\n### Examples\n\n``` bash\n$ hasgenerators\n# =\u003e returns 'true' || 'false'\n```\n\n\n---\n## Tests\n\n### Unit\n\nThis repository uses [tape][tape] for unit tests. To run the tests, execute the following command in the top-level application directory:\n\n``` bash\n$ make test\n```\n\nAll new feature development should have corresponding unit tests to validate correct functionality.\n\n\n### Test Coverage\n\nThis repository uses [Istanbul][istanbul] as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:\n\n``` bash\n$ make test-cov\n```\n\nIstanbul creates a `./reports/coverage` directory. To access an HTML version of the report,\n\n``` bash\n$ make view-cov\n```\n\n\n### Browser Support\n\nThis repository uses [Testling][testling] for browser testing. To run the tests in a (headless) local web browser, execute the following command in the top-level application directory:\n\n``` bash\n$ make test-browsers\n```\n\nTo view the tests in a local web browser,\n\n``` bash\n$ make view-browser-tests\n```\n\n\u003c!-- [![browser support][browsers-image]][browsers-url] --\u003e\n\n\n---\n## License\n\n[MIT license](http://opensource.org/licenses/MIT).\n\n\n## Copyright\n\nCopyright \u0026copy; 2016. Philipp Burckhardt.\n\n\n[npm-image]: http://img.shields.io/npm/v/detect-generator-support.svg\n[npm-url]: https://npmjs.org/package/detect-generator-support\n\n[build-image]: http://img.shields.io/travis/Planeshifter/detect-generator-support/master.svg\n[build-url]: https://travis-ci.org/Planeshifter/detect-generator-support\n\n[coverage-image]: https://img.shields.io/codecov/c/github/Planeshifter/detect-generator-support/master.svg\n[coverage-url]: https://codecov.io/github/Planeshifter/detect-generator-support?branch=master\n\n[dependencies-image]: http://img.shields.io/david/Planeshifter/detect-generator-support.svg\n[dependencies-url]: https://david-dm.org/Planeshifter/detect-generator-support\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/Planeshifter/detect-generator-support.svg\n[dev-dependencies-url]: https://david-dm.org/dev/Planeshifter/detect-generator-support\n\n[github-issues-image]: http://img.shields.io/github/issues/Planeshifter/detect-generator-support.svg\n[github-issues-url]: https://github.com/Planeshifter/detect-generator-support/issues\n\n[tape]: https://github.com/substack/tape\n[istanbul]: https://github.com/gotwarlost/istanbul\n[testling]: https://ci.testling.com\n\n[generator-function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplaneshifter%2Fdetect-generator-support","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplaneshifter%2Fdetect-generator-support","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplaneshifter%2Fdetect-generator-support/lists"}