{"id":16322750,"url":"https://github.com/shellscape/harmonica","last_synced_at":"2025-07-05T03:09:52.431Z","repository":{"id":47014963,"uuid":"76135958","full_name":"shellscape/harmonica","owner":"shellscape","description":"A module that allows use of Node.js --harmony flags, programmatically.","archived":false,"fork":false,"pushed_at":"2021-09-17T06:34:58.000Z","size":51,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T10:11:18.033Z","etag":null,"topics":["experimental","harmonica","harmony","harmony-flags","module","nodejs","npm"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/shellscape.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-12-10T20:28:35.000Z","updated_at":"2019-08-07T00:34:25.000Z","dependencies_parsed_at":"2022-09-16T13:30:49.912Z","dependency_job_id":null,"html_url":"https://github.com/shellscape/harmonica","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/shellscape/harmonica","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellscape%2Fharmonica","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellscape%2Fharmonica/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellscape%2Fharmonica/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellscape%2Fharmonica/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shellscape","download_url":"https://codeload.github.com/shellscape/harmonica/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellscape%2Fharmonica/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263674489,"owners_count":23494584,"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":["experimental","harmonica","harmony","harmony-flags","module","nodejs","npm"],"created_at":"2024-10-10T22:52:19.728Z","updated_at":"2025-07-05T03:09:52.413Z","avatar_url":"https://github.com/shellscape.png","language":"JavaScript","readme":"# harmonica [![Build Status](https://travis-ci.org/shellscape/harmonica.svg?branch=master)](https://travis-ci.org/shellscape/harmonica)\n\nA module that allows use of Node.js --harmony flags, programmatically.\n\n## \u0026nbsp;\n\u003cp align=\"center\"\u003e\n  \u003cb\u003e:rocket: \u0026nbsp; Are you ready to tackle ES6 and hone your JavaScript Skills?\u003c/b\u003e \u0026nbsp; :rocket:\u003cbr/\u003e\n  Check out these outstanding \u003ca href=\"https://es6.io/friend/POWELL\"\u003eES6 courses\u003c/a\u003e by \u003ca href=\"https://github.com/wesbos\"\u003e@wesbos\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n![Harmonica](harmonica.png)\n\nHarmonica allows developers to use `--harmony` flags programmatically. That means\nan end to specifying command-line options for experimental \"harmony\" features of\nNode.js/V8. If you've ever wanted to use experimental features within Gulp tasks,\nor have a need to run an app through wrappers like `forever`, this module takes\nthe command-line headache out of the equation.\n\n![screenshot](screenshot.png)\n\n## Node Version Requirements\n\nHarmonica should work with Node.js version 4.6.2 and higher. However, specifying\nflags which don't exist for a particular version will likely result in an error.\n\n## Usage\n\nInstall the module:\n\n`npm install harmonica`\n\nInitialize the module. By default, harmonica will use the `--harmony` flag,\nwhich will enable all harmony, in-progress features.\n\n```js\nrequire('harmonica')();\n```\n\n## Specifying Flags\n\nShould you need only specific flags, pass an `Array` of strings representing the\nflags you want to enable, without the leading hyphens, as the first parameter.\n\n```js\nrequire('harmonica')([\n  'harmony-array-values',\n  'harmony-async-await'\n]);\n```\n\n## Syntax Flags\n\nSome flags, such as `--harmony-async-await`, enable syntax features in Node.js.\nShould you require flags meant to extend the syntax, you must create an entry\npoint in a separate file from which to initialize harmonica. You can then\n`require` the main script for your app, which contains the body of code.\n\nPlease see [the tests for an example](test)\nwhich uses the `async` / `await` syntax.\n\n## Listing Available Flags\n\nIf you have the need to view all available harmony flags for your version of node,\nyou may do so by executing the following in a terminal:\n\n```bash\nnode --v8-options | grep \"in progress\"\n```\n\n## API\n\n### default([flags], [options])\n\n#### flags\n\n*Optional*  \nType: `Array`  \nDefault: `undefined`\n\nSee [Specifying Flags](#specifying-flags)\n\n#### options\n\n*Optional*  \nType: `Object`  \nDefault: `{ silent: false }`\n\nExample Usage of all options:\n\n```js\nrequire('harmonica')({ silent: true });\n```\n\nOr, if you need to specify flags:\n\n```js\nrequire('harmonica')([\n    'harmony-array-values',\n    'harmony-async-await'\n  ],\n  { silent: true });\n```\n\n##### silent\n\nType: `Boolean`  \nDefault: `false`\n\nShould you wish to silence harmonica's output, set a `silent` property on\n`options` to `false`.\n\n\n## Attribution\n\n[dcodeIO](http://dcode.io/) wrote and published the wonderful\n[harmonize](https://github.com/dcodeIO/node-harmonize) module. Harmonica is a\ncomplete rewrite of harmonize, but follows the same principles.\n\n[@stuk](https://twitter.com/stuk) was kind enough to allow me to use the\n'harmonica' module name in the NPM registry.\n\nHarmonica vector base by [saicreative](https://www.vecteezy.com/members/saicreative).\n\n## License\n\nMIT © [Andrew Powell](http://shellscape.org)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellscape%2Fharmonica","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshellscape%2Fharmonica","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellscape%2Fharmonica/lists"}