{"id":18575975,"url":"https://github.com/taskrjs/fly-util","last_synced_at":"2025-04-10T08:31:00.512Z","repository":{"id":34768977,"uuid":"38751127","full_name":"taskrjs/fly-util","owner":"taskrjs","description":"Fly Utility Toolbox","archived":false,"fork":false,"pushed_at":"2016-01-25T17:44:06.000Z","size":83,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T19:01:54.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"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/taskrjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-07-08T11:55:40.000Z","updated_at":"2017-06-08T11:25:09.000Z","dependencies_parsed_at":"2022-08-29T22:22:22.058Z","dependency_job_id":null,"html_url":"https://github.com/taskrjs/fly-util","commit_stats":null,"previous_names":["flyjs/fly-util"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskrjs%2Ffly-util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskrjs%2Ffly-util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskrjs%2Ffly-util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskrjs%2Ffly-util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taskrjs","download_url":"https://codeload.github.com/taskrjs/fly-util/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248185302,"owners_count":21061493,"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-11-06T23:23:03.542Z","updated_at":"2025-04-10T08:31:00.210Z","avatar_url":"https://github.com/taskrjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e Fly Utilities\n\n[![][fly-badge]][fly]\n[![npm package][npm-ver-link]][fly-util]\n[![][dl-badge]][npm-pkg-link]\n[![][travis-logo]][travis]\n![][mit-badge]\n\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://github.com/bucaran/fly-util\"\u003e\n    \u003cimg width=180px  src=\"https://cloud.githubusercontent.com/assets/8317250/8733685/0be81080-2c40-11e5-98d2-c634f076ccd7.png\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003e\u003ca href=\"#about\"\u003eAbout\u003c/a\u003e\u003c/b\u003e\n  |\n  \u003cb\u003e\u003ca href=\"#install\"\u003eInstall\u003c/a\u003e\u003c/b\u003e\n  |\n  \u003cb\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/b\u003e\n  |\n  \u003cb\u003e\u003ca href=\"#api\"\u003eAPI\u003c/a\u003e\u003c/b\u003e\n\u003c/p\u003e\n\n\n## About\n\n\u003e [_Fly_][fly] is a modern [build system](https://en.wikipedia.org/wiki/Build_automation) for [Node](https://nodejs.org/) based in [_co_-routines](https://medium.com/@tjholowaychuk/callbacks-vs-coroutines-174f1fe66127), [generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) and [promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n\n## Install\n\n```\nnpm install fly-util\n```\n\n## Usage\n\n```js\nimport util from \"fly-util\"\n```\n\n## API\n\n## `log`\n```js\nfunction log (...args)\n```\nWrapper for `Console.log`.\n\n## `error`\n```js\nfunction error (...args)\n```\nWrapper for `Console.error`.\n\n## `alert`\n```js\nfunction alert (...args)\n```\nWrapper for `Console.log` in a distinctive color. Set `process.env.VERBOSE` to show output.\n\n## `trace`\n ```js\nfunction trace (e)\n```\n+ `e {Object}` error object\n\nWrapper for [`prettyjson`](https://github.com/rafeca/prettyjson).\n\n## `defer`\n```js\nfunction defer (asyncFunc)\n```\n+ `asyncFunc {Function}` async function of the form (value, options, cb)\n+ `return` `{Function}` new function that returns a promise\n\nPromisify a function with a callback.\n\n## `flatten`\n```js\nfunction flatten (array)\n```\n+ `array {Array}`\n+ `return` `[[a],[b],[c]] → [a,b,c]`\n\nFlatten a nested array recursively.\n\n## `filter`\n```js\nfunction filter (pkg, load, blacklist = [], bind = true)\n```\n+ `pkg {Package}` project's package.json\n+ `load {Function}` load handler\n+ `blacklist {Array}` blacklisted plugins\n+ `return {Array}` list of fly dependencies that can be loaded\n\nFind `fly-*` plugins listed in a package dependencies.\n\n## `expand`\n```js\nfunction expand (pattern, options)\n```\n+ `pattern {String}` Pattern to match\n+ `handler {Object}` [options](https://github.com/isaacs/node-glob#options) to glob\n+ `return {Promise}`\n\nPromisified [glob](https://github.com/isaacs/node-glob) wrapper.\n\n## `find`\n```js\nfunction* find (path, names)\n```\n+ `path {String}` file or path to the Flyfile\n+ `bind {Function}` Optional. use to bind require or process path\n+ `return {String}` path to the Flyfile\n\nFind a valid Flyfile from a given path. If `path` is a directory find the first Flyfile with a [supported](https://github.com/tkellen/js-interpret) extension.\n\n## `bind`\n```js\nfunction bind (path, names)\n```\n\n+ `path {String}` file or path to the Flyfile\n+ `return {String}` path to the Flyfile\n\nBind to node's require based in the file extension of your Flyfile.\n\n\u003e Support ES6/7 by default, but Flyfiles can be written in any language supported in [interpret](https://github.com/tkellen/js-interpret).\n\n## Dependencies\n\n+ [`mz/fs`](https://github.com/normalize/mz) promise wrapped basic IO handling\n+ [`clor`](https://github.com/bucaran/clor) terminal colors\n+ [`glob`](https://github.com/isaacs/node-glob) expanding path/file glob patterns\n+ [`prettyjson`](https://github.com/rafeca/prettyjson) pretty formatting for JSON objects\n+ [`interpret`](https://github.com/tkellen/js-interpret) resolve modules for in-the-fly compilation.\n+ [`update-notifier`](https://github.com/yeoman/update-notifier) CLI update notifications\n\n# License\n\n[MIT](http://opensource.org/licenses/MIT) © [Jorge Bucaran][Author] et [al][contributors]\n:heart:\n\n[author]: http://about.bucaran.me\n[contributors]: https://github.com/bucaran/fly-util/graphs/contributors\n[fly]: https://www.github.com/bucaran/fly\n[fly-util]: https://www.github.com/bucaran/fly-util\n[fly-badge]: https://img.shields.io/badge/fly-JS-05B3E1.svg?style=flat-square\n[mit-badge]: https://img.shields.io/badge/license-MIT-444444.svg?style=flat-square\n[npm-pkg-link]: https://www.npmjs.org/package/fly-util\n[npm-ver-link]: https://img.shields.io/npm/v/fly-util.svg?style=flat-square\n[dl-badge]: http://img.shields.io/npm/dm/fly-util.svg?style=flat-square\n[travis-logo]: http://img.shields.io/travis/bucaran/fly-util.svg?style=flat-square\n[travis]: https://travis-ci.org/bucaran/fly-util\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskrjs%2Ffly-util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaskrjs%2Ffly-util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskrjs%2Ffly-util/lists"}