{"_id":"@37bytes/units-helper","_rev":"2-3320e48d1e7478a683989b2b87c21d34","name":"@37bytes/units-helper","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@37bytes/units-helper","version":"1.0.0","keywords":["units","size","units","time","units"],"author":{"name":"Ruslan Ispaev"},"license":"ISC","_id":"@37bytes/units-helper@1.0.0","maintainers":[{"name":"arhonist-37b","email":"naushev@37bytes.com"},{"name":"rispaev","email":"rispaev@37bytes.com"},{"name":"yar_vav","email":"yavavilin@37bytes.com"},{"name":"rteslenko","email":"rteslenko@37bytes.com"},{"name":"tnikolaeva","email":"tnikolaeva@37bytes.com"},{"name":"dc.nikolaev","email":"dnikolaev@37bytes.com"},{"name":"mgarmash","email":"ops@37bytes.com"}],"homepage":"https://github.com/37bytes/public-packages/units-helper","bugs":{"url":"https://github.com/37bytes/public-packages/issues"},"dist":{"shasum":"6e3bbf6f7791b9d5a8bf29e13132f2ee8ab34d65","tarball":"https://registry.npmjs.org/@37bytes/units-helper/-/units-helper-1.0.0.tgz","fileCount":8,"integrity":"sha512-8FtylKgn7oxjBe3niudAUSSLjV2cAZLHP6UPVawn0KvGf7zGXqe6cj5vS9UuKBvV/QWJTm5fo2MGuECIDi+lkQ==","signatures":[{"sig":"MEQCIC4HChd+dijoW3bwY3rUAW/j/MQ5K5nBUWlqXaRQNBO3AiBKfvq9iasR0NRcMFSEJr8iQesVMV4s7P0kk6I4DGjiEA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8666},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"2f7adb0324b31ab79503b4c3a44566b311b0dd9d","scripts":{"test":"jest","build":"npm run test && tsup","npm-packlist":"npm run build && npx -y npm-packlist@6.0.1"},"_npmUser":{"name":"dc.nikolaev","email":"dnikolaev@37bytes.com"},"repository":{"url":"git+https://github.com/37bytes/public-packages.git","type":"git"},"_npmVersion":"10.4.0","description":"A package for easier usage and conversion of different units","directories":{},"_nodeVersion":"20.8.0","_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/units-helper_1.0.0_1711950208675_0.9087361474710787","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@37bytes/units-helper","version":"2.0.0","description":"A package for easier usage and conversion of different units","repository":{"type":"git","url":"git+https://github.com/37bytes/public-packages.git","directory":"packages/units-helper"},"license":"ISC","author":{"name":"Ruslan Ispaev"},"type":"module","sideEffects":false,"exports":{".":{"import":{"types":"./build/index.d.mts","default":"./build/index.mjs"},"require":{"types":"./build/index.d.cts","default":"./build/index.cjs"}}},"main":"./build/index.cjs","module":"./build/index.mjs","types":"./build/index.d.mts","keywords":["units","size","time"],"devDependencies":{"eslint":"9.39.2","tsdown":"0.20.3","typescript":"5.8.3","vitest":"3.2.3","@37bytes/bundler":"0.0.0","@37bytes/code-style":"0.0.1"},"scripts":{"build":"tsdown","test":"vitest run","lint:typescript":"tsc --noEmit","lint:eslint":"eslint --fix --max-warnings 0 .","lint":"pnpm lint:typescript && pnpm lint:eslint","npm-packlist":"pnpm run build && npx -y npm-packlist@6.0.1"},"_id":"@37bytes/units-helper@2.0.0","bugs":{"url":"https://github.com/37bytes/public-packages/issues"},"homepage":"https://github.com/37bytes/public-packages#readme","_integrity":"sha512-K72AX6dFOWiifAKbkPMFL/cROslKqXDLFex26RLgr4s6mUtppi8mt8kl0NlDRHMIxHMZo12sZGAf3FqHi0mrzw==","_resolved":"/private/var/folders/5t/b72kl4gn5fs7rnfrhvh9l6sc0000gn/T/a8ad51f5543b11164dfbdf01bedf32d5/37bytes-units-helper-2.0.0.tgz","_from":"file:37bytes-units-helper-2.0.0.tgz","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-K72AX6dFOWiifAKbkPMFL/cROslKqXDLFex26RLgr4s6mUtppi8mt8kl0NlDRHMIxHMZo12sZGAf3FqHi0mrzw==","shasum":"ef4bf02560f53b06b1961f07347c88880f23985d","tarball":"https://registry.npmjs.org/@37bytes/units-helper/-/units-helper-2.0.0.tgz","fileCount":9,"unpackedSize":9002,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDEO7Pb6ymhzEDTpC7Gw2xWoCyzQTBHfBC7WrxXMHNYjAiAv22EfEXXbcOxhng0Ga1BoepTexdpxmmmwbd/EDRGxxg=="}]},"_npmUser":{"name":"dc.nikolaev","email":"dnikolaev@37bytes.com"},"directories":{},"maintainers":[{"name":"rteslenko","email":"rteslenko@37bytes.com"},{"name":"mgarmash","email":"ops@37bytes.com"},{"name":"dc.nikolaev","email":"dnikolaev@37bytes.com"},{"name":"tnikolaeva","email":"tnikolaeva@37bytes.com"},{"name":"arhonist-37b","email":"naushev@37bytes.com"},{"name":"yar_vav","email":"yavavilin@37bytes.com"},{"name":"rispaev","email":"rispaev@37bytes.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/units-helper_2.0.0_1773171537137_0.5855960019457511"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-01T05:43:28.591Z","modified":"2026-03-10T19:38:57.485Z","1.0.0":"2024-04-01T05:43:28.857Z","2.0.0":"2026-03-10T19:38:57.280Z"},"bugs":{"url":"https://github.com/37bytes/public-packages/issues"},"author":{"name":"Ruslan Ispaev"},"license":"ISC","homepage":"https://github.com/37bytes/public-packages#readme","keywords":["units","size","time"],"repository":{"type":"git","url":"git+https://github.com/37bytes/public-packages.git","directory":"packages/units-helper"},"description":"A package for easier usage and conversion of different units","maintainers":[{"name":"rteslenko","email":"rteslenko@37bytes.com"},{"name":"mgarmash","email":"ops@37bytes.com"},{"name":"dc.nikolaev","email":"dnikolaev@37bytes.com"},{"name":"tnikolaeva","email":"tnikolaeva@37bytes.com"},{"name":"arhonist-37b","email":"naushev@37bytes.com"},{"name":"yar_vav","email":"yavavilin@37bytes.com"},{"name":"rispaev","email":"rispaev@37bytes.com"}],"readme":"# @37bytes/units-helper\n\nThis package is a utility for working with various units of measurement in JavaScript/TypeScript. It includes two modules: `SizeUnit` and `TimeUnit`, which provide functions for converting values between different units of size and time, respectively.\n\n## Installation\n\nTo install the package, run the following command:\n\n```shell\nnpm install @37bytes/units-helper\n```\n\n## Usage\n\n### SizeUnit\n\nThe `SizeUnit` module contains the following functions:\n\n- `getKilobytes(value: number)`: Returns the value in kilobytes for the given number.\n- `getMegabytes(value: number)`: Returns the value in megabytes for the given number.\n- `getGigabytes(value: number)`: Returns the value in gigabytes for the given number.\n\n### TimeUnit\nThe `TimeUnit` module contains the following functions:\n\n- `getSeconds(value: number)`: Returns the value in seconds for the given number.\n- `getMinutes(value: number)`: Returns the value in minutes for the given number.\n- `getHours(value: number)`: Returns the value in hours for the given number.\n- `getDays(value: number)`: Returns the value in days for the given number.\n- `getWeeks(value: number)`: Returns the value in weeks for the given number.\n","readmeFilename":"README.md"}