{"_id":"@suchipi/femver","_rev":"1-07ac6491163eb22898240c36a754f88d","name":"@suchipi/femver","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@suchipi/femver","version":"1.0.0","description":"Lightweight alternative to semver, supporting absolute versions only","main":"index.js","types":"index.d.ts","publishConfig":{"access":"public"},"scripts":{"test":"jest"},"keywords":["semver","light","small","semantic","version","versioning","compare","comparison","parse"],"author":{"name":"Lily Scott","email":"me@suchipi.com"},"repository":{"type":"git","url":"git+https://github.com/suchipi/femver.git"},"license":"MIT","devDependencies":{"@suchipi/jasmine-mini":"^3.2.1","@types/jest":"^27.4.1","jest":"^27.5.1","pretty-print-error":"^1.0.0"},"gitHead":"4623fc442a29d37177fdaed86456b278b674de62","bugs":{"url":"https://github.com/suchipi/femver/issues"},"homepage":"https://github.com/suchipi/femver#readme","_id":"@suchipi/femver@1.0.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-bprE8+K5V+DPX7q2e2K57ImqNBdfGHDIWaGI5xHxZoxbKOuQZn4wzPiUxOAHnsUr3w3xHrWXwN7gnG/iIuEMIg==","shasum":"4909dcc069695e07bd23a64c4bfe411d11d9692f","tarball":"https://registry.npmjs.org/@suchipi/femver/-/femver-1.0.0.tgz","fileCount":5,"unpackedSize":7330,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFlBEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq5lxAAjF7X7zAndqLW9eFdOVJ3PvpJY4huPUf+1o6QAY3VEtZ0KT3f\r\nHHmnr7Y81q2G02cq+qVQIPoaB+A1GA4MXDzLBRbxX2VMUzcmVwhA0xZ+p8+p\r\n9jt14VPVjGGzY8Eh44ytUtEaHXDH924O2cHG2hF0aoj7oFSmmZ8RiTMDGGA6\r\nle4j5jmwniaKubgjc9FMaQeYDeq6CmrkPyjhIIqeeAxgc0jnWxeYhdchdf/O\r\nTpdT/mcVZf5ncf7YCBTnkiwNmSl9tCw+GaYJvAs7OLfwZE2zcfyIaPaJwkH9\r\nzN9TeATN3b675YQzLjPAG4H7TG3afdp80AOaKENw/ZPjIgFR9Dy1Tv6m7uRe\r\n+v0GtspbzpscJRTl7U/pWN/BUsqSsRzPrrtlWRDPLzRdkhm4xEjzIzh5ce6/\r\nEId7DQr10hrIEfCAfe10Rs3qwqkRV911DLWPvzCCGVMGd8vKO9zzrXfbPA/B\r\nC5mWvF8RQMxVcvzKyCc1g6HL1Jy5CN1esShytIBGziHBckG2e+tK6fAje4rq\r\n/Gce9vx+viSXedWkLGk3nZZ9PUwa4jhXS2POHPYCdMGuIF+O1XzVsmmmiqQs\r\nSTRoboPWGpixTHckdXoWFU/uYfVbYMkX8ux7kjeqwCNSwsgXjCrGI4pMPEJ2\r\niiEUDwZa0s/+cpYzDsj9uJgz/YVNdyYsNTo=\r\n=i/xk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHlxD3vR0VNIRR2x/1QtK2IlkvCHPiu9n+An94Vc3pHOAiEAm7przBUXsCh3AjbD3sHW6IMQiFYSvD0Tl90txCe/zEk="}]},"_npmUser":{"name":"suchipi","email":"me@suchipi.com"},"directories":{},"maintainers":[{"name":"suchipi","email":"me@suchipi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/femver_1.0.0_1645629508401_0.7277958101163409"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-23T15:18:28.355Z","1.0.0":"2022-02-23T15:18:28.529Z","modified":"2022-04-07T03:11:55.866Z"},"maintainers":[{"name":"suchipi","email":"me@suchipi.com"}],"description":"Lightweight alternative to semver, supporting absolute versions only","homepage":"https://github.com/suchipi/femver#readme","keywords":["semver","light","small","semantic","version","versioning","compare","comparison","parse"],"repository":{"type":"git","url":"git+https://github.com/suchipi/femver.git"},"author":{"name":"Lily Scott","email":"me@suchipi.com"},"bugs":{"url":"https://github.com/suchipi/femver/issues"},"license":"MIT","readme":"# @suchipi/femver\n\n> Lightweight alternative to semver, supporting absolute versions only\n\nThe [semver npm package](https://www.npmjs.com/package/semver) is big, weighing in at 88.2 kB (with one dependency, weighing 53.9 kB).\n\nIt's big because it has a lot of features, like:\n\n- Matching versions against ranges and patterns\n- Coercing vague versions into semver strings\n- Identifying the minimum/maximum version of a range\n- Cleaning version-like strings into semver strings\n\nThese features are great; they're what power npm and let us specify version ranges in our `package.json`s.\n\nHowever, if you only need to compare two version strings, like so:\n\n```js\nconst semver = require(\"semver\");\n\nsemver.gte(process.version, \"8.0.0\");\n```\n\nThen pulling in all of semver is a little unnecessary.\n\nThat's where `@suchipi/femver` comes in; it's a lightweight alternative to `semver`, which _only_ supports comparing absolute versions (eg `1.2.0`, not `>= 1.0.0`).\n\n## API\n\n```ts\n/**\n * Reports whether `version` is a valid (absolute) semantic version string.\n */\nexport function isValid(version: string): boolean;\n\n/**\n * Parses `version` into an object containing major, minor, and patch properties.\n */\nexport function parse(version: string): {\n  major: number;\n  minor: number;\n  patch: number;\n};\n\n/**\n * Returns whether `firstVersion` is less than `secondVersion`.\n */\nexport function lt(firstVersion: string, secondVersion: string): boolean;\n\n/**\n * Returns whether `firstVersion` is less than or equal to `secondVersion`.\n */\nexport function lte(firstVersion: string, secondVersion: string): boolean;\n\n/**\n * Returns whether `firstVersion` is greater than `secondVersion`.\n */\nexport function gt(firstVersion: string, secondVersion: string): boolean;\n\n/**\n * Returns whether `firstVersion` is greater than or equal to `secondVersion`.\n */\nexport function gte(firstVersion: string, secondVersion: string): boolean;\n\n/**\n * Returns whether `firstVersion` is equal to `secondVersion`.\n */\nexport function eq(firstVersion: string, secondVersion: string): boolean;\n```\n\n## Example\n\n```js\nconst femver = require(\"@suchipi/femver\");\n// or:\n// import * as femver from \"@suchipi/femver\";\n\nfemver.gte(process.version, \"8.0.0\");\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}