{"_id":"picospinner","_rev":"8-008ff921192d2d0470d07dca62057527","name":"picospinner","dist-tags":{"latest":"3.1.2"},"versions":{"1.0.1":{"name":"picospinner","version":"1.0.1","keywords":["spinner","cli","lightweight","minimal"],"author":{"name":"PondWader"},"license":"MIT","_id":"picospinner@1.0.1","maintainers":[{"name":"pondwader","email":"pondwadermc@gmail.com"}],"dist":{"shasum":"1b55e2d3318cfe512f985f669abbd85a79ed0998","tarball":"https://registry.npmjs.org/picospinner/-/picospinner-1.0.1.tgz","fileCount":13,"integrity":"sha512-CayjSZ2+LtFmijoxv/aYGYXjaw+LgcggDoU6OnFsEyKC7rYhBnq/QhsgLiqJHzbtJizCg7TAm3Pc4K+/n4xqiw==","signatures":[{"sig":"MEQCIFQGmxitAhlPCmhixwEebFb9Cz+FZOcnJzfjf2RM6ZbbAiA4wpqczj59i2mEP2wVNV8HCkjpfHNNNr/hfQzzCK6pOg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18608},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","gitHead":"d0990a870b1954c97207e1527724be9cb79f2aad","scripts":{"lint":"npm run lint:format && eslint src","test":"tsc && npm run build && c8 --exclude-after-remap node --test","bench":"tsc && node ./bench/string-width.mjs","build":"tsc","format":"prettier --write src","lint:format":"prettier --check src"},"_npmUser":{"name":"pondwader","email":"pondwadermc@gmail.com"},"_npmVersion":"10.8.1","description":"A lightweight, no dependency, pluggable CLI spinner library.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.2","prettier":"^3.3.2","tinybench":"^2.8.0","@eslint/js":"^9.6.0","@types/bun":"^1.1.6","typescript":"^5.5.2","@types/node":"^20.14.9","string-width":"^7.2.0","capture-console":"^1.0.2","typescript-eslint":"^7.14.1","@types/capture-console":"^1.0.5","fast-string-truncated-width":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/picospinner_1.0.1_1719948207014_0.39858216279679115","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"picospinner","version":"2.0.0","keywords":["spinner","cli","lightweight","minimal"],"author":{"name":"PondWader"},"license":"MIT","_id":"picospinner@2.0.0","maintainers":[{"name":"pondwader","email":"pondwadermc@gmail.com"}],"homepage":"https://github.com/PondWader/picospinner#readme","bugs":{"url":"https://github.com/PondWader/picospinner/issues"},"dist":{"shasum":"2b3cf7f49b0ecbd2ade13e005f45e89861a334d0","tarball":"https://registry.npmjs.org/picospinner/-/picospinner-2.0.0.tgz","fileCount":7,"integrity":"sha512-bRX16jAx5sDlSAEKJ26hKloGU+w2DIkGw0qeUn87WkT8xircacGumNFHS0d/s51S9QbrtoEFwRSAvIvHNstfjA==","signatures":[{"sig":"MEQCIDH25rVtcM897J6H3YHoVNXIOvKus8TR38JUpEdWHg2AAiBSVtBZQCVIoaBnJD2vt+MGBHClsYWrK0r4FjJaJZDikA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31495},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"6231501ccf44a69ce125e40def37aada127337cc","scripts":{"lint":"npm run lint:format && eslint src","test":"tsc && c8 --exclude-after-remap node --test","bench":"tsc && node ./bench/string-width.mjs","build":"tsup ./src/index.ts --format cjs,esm --dts","format":"prettier --write src","lint:format":"prettier --check src"},"_npmUser":{"name":"pondwader","email":"pondwadermc@gmail.com"},"_npmVersion":"10.8.2","description":"A lightweight, no dependency, pluggable CLI spinner library.","directories":{},"_nodeVersion":"20.16.0","_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.2","tsup":"^8.3.5","prettier":"^3.3.2","tinybench":"^2.8.0","@eslint/js":"^9.6.0","@types/bun":"^1.1.6","typescript":"^5.5.2","@types/node":"^20.14.9","string-width":"^7.2.0","capture-console":"^1.0.2","typescript-eslint":"^7.14.1","@types/capture-console":"^1.0.5","fast-string-truncated-width":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/picospinner_2.0.0_1730751751233_0.3742822368687848","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"picospinner","version":"2.1.0","keywords":["spinner","cli","lightweight","minimal"],"author":{"name":"PondWader"},"license":"MIT","_id":"picospinner@2.1.0","maintainers":[{"name":"pondwader","email":"pondwadermc@gmail.com"}],"homepage":"https://github.com/PondWader/picospinner#readme","bugs":{"url":"https://github.com/PondWader/picospinner/issues"},"dist":{"shasum":"82c6c7548158d10d54490e7dcb878ac5435f49a3","tarball":"https://registry.npmjs.org/picospinner/-/picospinner-2.1.0.tgz","fileCount":7,"integrity":"sha512-kaBFPNItKVivIKrWt0RuLz0UilZX8KgZeaBrjSUjjExza5ISWtBAtbDYTOon31EGGH6wTdQ22gTXiykmhv/Kqg==","signatures":[{"sig":"MEUCIQDivCRxoTRf5WYYCsoAz98lUnwhQ7/rImtYIGz//8JihAIgYA8QD5SddAC+nNp3/GdIhZGIUvG2LGuKSdYFKApjEpY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37096},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"1e2ac3b7d2c086677feaa44dafe97ee94a11bc7a","scripts":{"lint":"npm run lint:format && eslint src","test":"tsc && c8 --exclude-after-remap node --test","bench":"tsc && node ./bench/string-width.mjs","build":"tsup ./src/index.ts --format cjs,esm --dts","format":"prettier --write src","lint:format":"prettier --check src"},"_npmUser":{"name":"pondwader","email":"pondwadermc@gmail.com"},"_npmVersion":"11.1.0","description":"A lightweight, no dependency, pluggable CLI spinner library.","directories":{},"_nodeVersion":"22.13.1","_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.2","tsup":"^8.3.5","prettier":"^3.3.2","tinybench":"^2.8.0","@eslint/js":"^9.6.0","@types/bun":"^1.1.6","typescript":"^5.5.2","@types/node":"^22.13.8","string-width":"^7.2.0","capture-console":"^1.0.2","typescript-eslint":"^7.14.1","@types/capture-console":"^1.0.5","fast-string-truncated-width":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/picospinner_2.1.0_1742150117601_0.24416351971118644","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"picospinner","version":"3.0.0","keywords":["spinner","cli","lightweight","minimal"],"author":{"name":"PondWader"},"license":"MIT","_id":"picospinner@3.0.0","maintainers":[{"name":"pondwader","email":"pondwadermc@gmail.com"}],"homepage":"https://github.com/PondWader/picospinner#readme","bugs":{"url":"https://github.com/PondWader/picospinner/issues"},"dist":{"shasum":"30e58d36925d5af9711ab41e05e36d0446d3adbd","tarball":"https://registry.npmjs.org/picospinner/-/picospinner-3.0.0.tgz","fileCount":15,"integrity":"sha512-lGA1TNsmy2bxvRsTI2cV01kfTwKzZjnZSDmF9llYNyMHMrU4sP87lQ5taiIKm88L3cbswjl008nwyGc3WpNvzg==","signatures":[{"sig":"MEYCIQC5xFG3WdO5YlB9SuiNlI1oJcpvhDOwgyMf04fT/4aSfAIhAPIWzgBLzdlbxUDeNX/1AU+tTZcZwPU22Vnmk19adEzS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25051},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"default":"./dist/index.js"}},"gitHead":"94a4033af1835e570c53d79c2f84cd3b0173980f","scripts":{"lint":"npm run lint:format && eslint src","test":"tsc --sourcemap && c8 --exclude-after-remap node --test","bench":"npm run build && node ./bench/string-width.mjs","build":"tsc","format":"prettier --write src","lint:format":"prettier --check src"},"_npmUser":{"name":"pondwader","email":"pondwadermc@gmail.com"},"_npmVersion":"11.1.0","description":"A lightweight, no dependency, pluggable CLI spinner library.","directories":{},"_nodeVersion":"22.13.1","_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.2","prettier":"^3.3.2","tinybench":"^2.8.0","@eslint/js":"^9.6.0","@types/bun":"^1.1.6","typescript":"^5.5.2","@types/node":"^22.13.8","string-width":"^7.2.0","capture-console":"^1.0.2","typescript-eslint":"^7.14.1","@types/capture-console":"^1.0.5","fast-string-truncated-width":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/picospinner_3.0.0_1742401389116_0.8355031788532492","host":"s3://npm-registry-packages-npm-production"}},"3.1.2":{"_id":"picospinner@3.1.2","bugs":{"url":"https://github.com/tinylibs/picospinner/issues"},"dist":{"shasum":"86e7c623a5b6860e48bc7cbd51e6017ae8fd8909","tarball":"https://registry.npmjs.org/picospinner/-/picospinner-3.1.2.tgz","integrity":"sha512-0Z++uU8mvB0EvCPAEUq9BGiPcSravzJ+RPdXfjYlzXffqsogisiKRQqI6ctrSSJ6n985vxrgKtQ5n4sRINcJZg==","fileCount":15,"unpackedSize":26646,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/picospinner@3.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBhv9hOahM8ETgnHs/BsMBUeq/r8okxawW528sPhMABzAiAYLuDlOrFFALZd/8lpc43WgbsH3Nx2IhBhbssdKqY/NA=="}]},"name":"picospinner","type":"module","types":"./dist/index.d.ts","author":{"name":"PondWader"},"engines":{"node":">=18.0.0"},"exports":{".":{"default":"./dist/index.js"}},"gitHead":"b844d46d222949c8aaef43ce1e687ef7b07cc6b0","license":"MIT","scripts":{"lint":"npm run lint:format && eslint src","test":"tsc --sourcemap && c8 --exclude-after-remap node --test dist/**/*-test.js","bench":"npm run build && node ./bench/string-width.mjs","build":"tsc","format":"prettier --write src","lint:format":"prettier --check src"},"version":"3.1.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5d00221d-98ca-496c-9d56-bd56f27683ab"},"approver":{"name":"43081j","email":"43081james@gmail.com"}},"homepage":"https://github.com/tinylibs/picospinner#readme","keywords":["spinner","cli","lightweight","minimal"],"repository":{"url":"git+https://github.com/tinylibs/picospinner.git","type":"git"},"_npmVersion":"12.0.1","description":"A lightweight, no dependency, pluggable CLI spinner library.","directories":{},"maintainers":[{"name":"43081j","email":"43081james@gmail.com"},{"name":"pondwader","email":"pondwadermc@gmail.com"}],"_nodeVersion":"22.23.1","devDependencies":{"c8":"^10.1.2","prettier":"^3.3.2","tinybench":"^2.8.0","@eslint/js":"^9.6.0","@types/bun":"^1.1.6","typescript":"^5.5.2","@types/node":"^22.13.8","string-width":"^7.2.0","capture-console":"^1.0.2","typescript-eslint":"^7.14.1","@types/capture-console":"^1.0.5","fast-string-truncated-width":"^1.1.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/picospinner_3.1.2_1785332318965_0.6369284077092003"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-02T19:23:27.013Z","modified":"2026-07-29T13:38:39.329Z","1.0.0":"2024-06-30T20:19:09.556Z","1.0.1":"2024-07-02T19:23:27.176Z","2.0.0":"2024-11-04T20:22:31.412Z","2.1.0":"2025-03-16T18:35:17.790Z","3.0.0":"2025-03-19T16:23:09.333Z","3.1.2":"2026-07-29T13:38:39.046Z"},"bugs":{"url":"https://github.com/tinylibs/picospinner/issues"},"author":{"name":"PondWader"},"license":"MIT","homepage":"https://github.com/tinylibs/picospinner#readme","keywords":["spinner","cli","lightweight","minimal"],"description":"A lightweight, no dependency, pluggable CLI spinner library.","maintainers":[{"name":"43081j","email":"43081james@gmail.com"},{"name":"pondwader","email":"pondwadermc@gmail.com"}],"readme":"# picospinner\n\n<img src=\"https://raw.githubusercontent.com/PondWader/picospinner/main/assets/demo.gif\" width=\"522\" alt=\"Demo\">\n\nA lightweight, no dependency, pluggable CLI spinner library.\n\n## Install\n\n```\nnpm i picospinner\n```\n\n#### ESM & CommonJS\n\nAs of version 3, this package is published exclusively as an [ES module](https://nodejs.org/api/esm.html#modules-ecmascript-modules). Recent Node.js versions (v20.17.0+) support [`require(esm)`](https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require) in [CommonJS](https://nodejs.org/api/modules.html#modules-commonjs-modules). If a version with CommonJS syntax is required version 2 of this package can be installed with `npm i picospinner@2`. Version 2 will continue to be maintained in the [v2](https://github.com/tinylibs/picospinner/tree/v2) branch for the foreseeable future but will not receive new features.\n\n## Usage\n\n### Basic\n\n```js\nimport {Spinner} from 'picospinner';\n\nconst spinner = new Spinner('Loading...');\nspinner.start();\nsetTimeout(() => {\n  // Spinner can be ended with one of: succeed, fail, warn, info or stop\n  spinner.succeed('Finished.');\n}, 5000);\n```\n\n### Custom symbols\n\n```js\nimport {Spinner} from 'picospinner';\n\nconst spinner = new Spinner('Loading...', {\n  symbols: {\n    warn: '⚠'\n  }\n});\nspinner.start();\nsetTimeout(() => {\n  spinner.warn(\"Something didn't go quite right.\");\n}, 5000);\n```\n\n### Custom frames\n\n```js\nimport {Spinner} from 'picospinner';\n\nconst spinner = new Spinner('Loading...', {\n  frames: ['-', '\\\\', '|', '/']\n});\nspinner.start();\nsetTimeout(() => {\n  spinner.info('Finished.');\n}, 5000);\n```\n\n### Removing the spinner\n\nCalling `spinner.stop();` will stop the spinner and remove it.\n\n### Output stream\n\nSpinners write to `process.stdout` by default. To keep stdout available for machine-readable output, pass another stream such as `process.stderr`:\n\n```js\nimport {Spinner} from 'picospinner';\n\nconst spinner = new Spinner({\n  text: 'Loading...',\n  stream: process.stderr\n});\n```\n\n### Colours\n\nAs of version **3.0.0** colours are enabled by default. This feature uses the [`styleText`](https://nodejs.org/api/util.html#utilstyletextformat-text-options) function from [`node:util`](https://nodejs.org/api/util.html) if it is available (Node versions greater than **22.0.0**, **21.7.0** or **20.12.0**). If it's not available, no colours will be displayed.\n\nThe `colors` option can be passed to disable colours or customise the colours. The option accepts a boolean value controlling whether or not to display the default colours or it can be passed an object defining styles for each component type as shown below:\n\n```js\n// Create spinner with no colours\nconst spinner = new Spinner('Loading...', {colors: false});\n\n// Create spinner with custom colours\nconst spinner = new Spinner('Loading...', {\n  colors: {\n    text: 'gray',\n    succeed: ['bold', 'green'],\n    spinner: 'magenta'\n    // The other properties (fail, warn, info) will use the default colours since they're not specified in this example\n  }\n});\n```\n\nAlternatively, colours can be displayed by using a third-party formatter such as picocolors or chalk. First install picocolors:\n\n```\nnpm i picocolors\n```\n\nText can be formatted by passing pre-formatted text:\n\n```js\nimport {Spinner} from 'picospinner';\nimport pc from 'picocolors';\n\nconst spinner = new Spinner(pc.blue('Loading...'));\nspinner.start();\nsetTimeout(() => spinner.setText(pc.magenta(\"Now it's magenta!\")), 1000);\n```\n\nSymbols can be formatted by passing a symbol formatter.\n\n```js\nimport {Spinner} from 'picospinner';\nimport pc from 'picocolors';\n\nconst spinner = new Spinner({\n  text: pc.blue('Loading...'),\n  symbolFormatter: pc.green\n});\nspinner.start();\nspinner.fail({\n  text: 'Disaster!',\n  symbolFormatter: pc.red\n});\n```\n\nYou can also use a formatter to add suffixes and prefixes:\n\n```js\nconst spinner = new Spinner({\n  ...opts,\n  symbolFormatter: (str) => `Prefix ${str} Suffix`\n});\n```\n\n### Custom rotation speed\n\nA custom tick speed (how often the spinner rotates) in milliseconds can be passed to `spinner.start`:\n\n```js\nimport {Spinner} from 'picospinner';\n\nconst spinner = new Spinner();\nspinner.start(10);\n```\n","readmeFilename":"README.md","repository":{"url":"git+https://github.com/tinylibs/picospinner.git","type":"git"}}