{"_id":"@antropia/snip","name":"@antropia/snip","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@antropia/snip","version":"1.0.1","description":"Utility library for TS by Antropia Studio","source":"./src/index.ts","main":"./lib/commonjs/index.js","module":"./lib/module/index.js","types":"./lib/typescript/module/src/index.d.ts","packageManager":"npm@11.7.0","exports":{".":{"import":{"types":"./lib/typescript/module/src/index.d.ts","default":"./lib/module/index.js"},"require":{"types":"./lib/typescript/commonjs/src/index.d.ts","default":"./lib/commonjs/index.js"}}},"scripts":{"test":"vitest","lint":"tsc --noEmit && biome lint","lint:fix":"tsc --noEmit && biome format --write","clean":"del-cli lib","prepare":"bob build","release":"release-it","release:patch":"release-it --increment=patch","release:minor":"release-it --increment=minor","release:major":"release-it --increment=major"},"keywords":["typescript","utility"],"repository":{"type":"git","url":"git+https://github.com/antropia-studio/snip.git"},"author":{"name":"Antropia Studio","email":"oss@antropia.studio","url":"https://antropia.studio"},"license":"MIT","bugs":{"url":"https://github.com/antropia-studio/snip/issues"},"homepage":"https://github.com/antropia-studio/snip#readme","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"dependencies":{"react-native-uuid":"^2.0.3","tiny-invariant":"^1.3.3"},"devDependencies":{"@biomejs/biome":"2.3.11","@commitlint/config-conventional":"^20.3.1","@evilmartians/lefthook":"^2.0.14","@release-it/conventional-changelog":"^10.0.4","@types/react":"^19.2.8","commitlint":"^20.3.1","conventional-changelog-angular":"^8.1.0","del-cli":"^7.0.0","fast-check":"^4.5.3","react-native-builder-bob":"^0.40.17","release-it":"^19.2.3","typescript":"^5.9.3","vitest":"^4.0.17"},"optionalDependencies":{"@rollup/rollup-linux-x64-gnu":"4.9.5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"commitMessage":"chore: release ${version}","tagName":"v${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"react-native-builder-bob":{"source":"src","output":"lib","targets":[["commonjs",{"esm":true}],["module",{"esm":true}],["typescript",{"project":"tsconfig.json"}]]},"gitHead":"f8e6805c66e8ef79c4545ea2196b9154a61b39c8","_id":"@antropia/snip@1.0.1","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-aC13FbuywaUw4tW4nPpIj/Jrjr3EBJotIPkHl5eQZ7CMCaRpi1ZfFxUyObzZUW0Er/E+Jn15F94mdZ8+sAz5Jg==","shasum":"6597c94c5c002bdb03b6979a9fb453912a88eb46","tarball":"https://registry.npmjs.org/@antropia/snip/-/snip-1.0.1.tgz","fileCount":88,"unpackedSize":152665,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDCTw4L11aeVWEKW8DF4VKd658uAc4uPjN9ntS+BbxhFgIgA+I0+Y7Gw7I0Zg1UJte9gW6mW3Sm4CnPhLzhzJNIpnU="}]},"_npmUser":{"name":"serchinastico","email":"safe.desk3516@fastmail.com"},"directories":{},"maintainers":[{"name":"serchinastico","email":"safe.desk3516@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/snip_1.0.1_1768240573669_0.07053081755394852"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-12T17:56:13.533Z","1.0.1":"2026-01-12T17:56:13.817Z","modified":"2026-01-12T17:56:14.165Z"},"maintainers":[{"name":"serchinastico","email":"safe.desk3516@fastmail.com"}],"description":"Utility library for TS by Antropia Studio","homepage":"https://github.com/antropia-studio/snip#readme","keywords":["typescript","utility"],"repository":{"type":"git","url":"git+https://github.com/antropia-studio/snip.git"},"author":{"name":"Antropia Studio","email":"oss@antropia.studio","url":"https://antropia.studio"},"bugs":{"url":"https://github.com/antropia-studio/snip/issues"},"license":"MIT","readme":"# Snip\n\n**Snip** is a TypeScript utility library with the stuff you actually need. Small footprint, full type safety, works everywhere.\n\n## Overview\n\nA collection of well-tested utilities for arrays, objects, strings, math, and async operations. Everything you find yourself rewriting across projects, packaged up with proper types and security in mind.\n\n## Installation\n\n```bash\nnpm install @antropia/snip\n```\n\n```bash\nyarn add @antropia/snip\n```\n\n```bash\npnpm add @antropia/snip\n```\n\n## Usage\n\n```typescript\nimport { range, oneOf, groupBy, exponentialBackoffDelay } from '@antropia/snip';\n\n// Generate sequences\nconst numbers = range(5);  // [0, 1, 2, 3, 4]\n\n// Random selection\nconst greeting = oneOf(['Hey', 'Hi', 'Hello', 'Howdy']);\n\n// Group data\nconst users = [\n  { id: 1, role: 'admin' },\n  { id: 2, role: 'user' },\n  { id: 3, role: 'admin' },\n];\nconst byRole = groupBy(users, user => user.role);\n// { admin: [...], user: [...] }\n\n// Exponential backoff for retries\nawait exponentialBackoffDelay(2);\n```\n\n## Design Principles\n\n- **Simplicity over cleverness** — Code should be obvious\n- **Safety first** — Runtime checks where needed, strict TypeScript everywhere\n- **Practical, not exhaustive** — What you actually use, not every possible variation\n- **Good defaults** — Sensible behavior out of the box\n\n## Development\n\n```bash\n# Run tests\nnpm test\n\n# Lint and type-check\nnpm run lint\n\n# Build\nnpm run prepare\n\n# Release\nnpm run release\n```\n\n## Contributing\n\nFound a bug or have a useful utility to add? Open an issue or PR on [GitHub](https://github.com/antropia-studio/snip).\n\nNote: We're picky. New utilities should be genuinely useful, well-tested, and fit the library's philosophy.\n\n## License\n\nMIT © [Antropia Studio](https://antropia.studio)\n","readmeFilename":"README.md","_rev":"1-ab508abd35d9f6d213adf3b521eb8fb8"}