{"id":16785710,"url":"https://github.com/usmanyunusov/nanospinner","last_synced_at":"2025-05-15T01:06:34.093Z","repository":{"id":42369162,"uuid":"408890665","full_name":"usmanyunusov/nanospinner","owner":"usmanyunusov","description":"🌀 The simplest and tiniest terminal spinner for Node.js","archived":false,"fork":false,"pushed_at":"2024-12-10T07:43:30.000Z","size":156,"stargazers_count":216,"open_issues_count":2,"forks_count":17,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T23:53:33.121Z","etag":null,"topics":["spinner","spinners","terminal"],"latest_commit_sha":null,"homepage":"https://npm.im/nanospinner","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/usmanyunusov.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-21T16:18:12.000Z","updated_at":"2025-03-21T18:16:30.000Z","dependencies_parsed_at":"2024-12-13T08:02:08.455Z","dependency_job_id":"888063cd-30bf-403d-aa3b-6879e0374c78","html_url":"https://github.com/usmanyunusov/nanospinner","commit_stats":{"total_commits":126,"total_committers":9,"mean_commits":14.0,"dds":"0.23809523809523814","last_synced_commit":"acc67f28068279308e6c819a6a19ddb49b35dd7e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmanyunusov%2Fnanospinner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmanyunusov%2Fnanospinner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmanyunusov%2Fnanospinner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmanyunusov%2Fnanospinner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usmanyunusov","download_url":"https://codeload.github.com/usmanyunusov/nanospinner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254041,"owners_count":22039792,"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":["spinner","spinners","terminal"],"created_at":"2024-10-13T08:10:03.847Z","updated_at":"2025-05-15T01:06:29.078Z","avatar_url":"https://github.com/usmanyunusov.png","language":"JavaScript","funding_links":[],"categories":["Utilities"],"sub_categories":["Command Line Interfaces (CLI)"],"readme":"# Nano Spinner\n\nThe simplest and tiniest terminal spinner for Node.js\n\n```js\nimport { createSpinner } from 'nanospinner'\n\nconst spinner = createSpinner('Run test').start()\n\nsetTimeout(() =\u003e {\n  spinner.success()\n}, 1000)\n```\n\n- Only **single dependency** (picocolors).\n- It **14 times** smaller than `ora`.\n- Support both CJS and ESM projects.\n- **TypeScript** type declarations included.\n\n## Motivation\n\nWith `nanospinner` we are trying to draw attention to the `node_modules` size problem and promote performance-first culture.\n\n## Benchmarks\n\nThe space in `node_modules` including sub-dependencies:\n\n```diff\n$ node ./test/size.js\nData from packagephobia.com\n  ora           280 kB\n+ nanospinner    20 kB\n```\n\n## API\n\n**`.spin()`**\n\nLooping over `spin` method will animate a given spinner.\n\n```js\nsetInterval(() =\u003e {\n  spinner.spin()\n}, 25)\n```\n\n**`.start(options?)`**\n\nIn order to start the spinner call `start`. This will perform drawing the spinning animation\n\n```js\nspinner.start()\nspinner.start('Start')\nspinner.start({ text: 'Start', color: 'yellow' })\n```\n\n**`.stop(options?)`**\n\nIn order to stop the spinner call `stop`. This will finish drawing the spinning animation and return to new line.\n\n```js\nspinner.stop()\nspinner.stop('Done!')\nspinner.stop({ text: 'Done!', mark: ':O', color: 'magenta' })\n```\n\n**`.success(options?)`**\n\nUse `success` call to stop the spinning animation and replace the spinning symbol with check mark character to indicate successful completion.\n\n```js\nspinner.success()\nspinner.success('Successful!')\nspinner.success({ text: 'Successful!', mark: ':)' })\n```\n\n**`.warn(options?)`**\n\nUse `warn` call to stop the spinning animation and replace the spinning symbol with warn mark character to indicate warning completion.\n\n```js\nspinner.warn()\nspinner.warn('Warning!')\nspinner.warn({ text: 'Warning!', mark: ':|' })\n```\n\n**`.error(options?)`**\n\nUse `error` call to stop the spinning animation and replace the spinning symbol with cross character to indicate error completion.\n\n```js\nspinner.error()\nspinner.error('Error!')\nspinner.error({ text: 'Error!', mark: ':(' })\n```\n\n**`.info(options?)`**\n\nUse `info` call to stop the spinning animation and replace the spinning symbol with info mark character to indicate info completion.\n\n```js\nspinner.info()\nspinner.info('Info!')\nspinner.info({ text: 'Info!', mark: 'i' })\n```\n\n**`.update(options?)`**\n\nUse `update` call to dynamically change\n\n```js\nspinner.update('Run test')\nspinner.update({\n  text: 'Run test',\n  color: 'white',\n  stream: process.stdout,\n  frames: ['.', 'o', '0', '@', '*'],\n  interval: 100,\n})\n```\n\n**`.clear()`**\n\nClears the spinner`s output\n\n```js\nspinner.clear()\n```\n\n**`.reset()`**\n\nIn order to reset the spinner to its initial frame do:\n\n```js\nspinner.reset()\n```\n\n## Roadmap\n\n- [ ] Multi spinners\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusmanyunusov%2Fnanospinner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusmanyunusov%2Fnanospinner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusmanyunusov%2Fnanospinner/lists"}