{"_id":"semver2int","_rev":"3-edf531d6ce486d275a1fa4e8e2a8fbd0","name":"semver2int","description":"convert a semver string to an integer for simple comparisons","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"semver2int","version":"0.0.1","description":"convert a semver string to an integer for simple comparisons","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha"},"keywords":["semver","int","number","convert","compare"],"author":{"name":"Eli Dupuis","email":"elidupuis@gmail.com"},"repository":{"type":"git","url":"https://github.com/elidupuis/semver2int.git"},"bugs":{"url":"https://github.com/elidupuis/semver2int/issues"},"license":"ISC","devDependencies":{"mocha":"^2.2.1"},"gitHead":"cae20ecb15c3ddd995b5cf5bd7c2fc396a5f8c0c","homepage":"https://github.com/elidupuis/semver2int","_id":"semver2int@0.0.1","_shasum":"2ba38b46cd4c69dbf6ffc02a9e47a4f9f215c685","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.28","_npmUser":{"name":"elidupuis","email":"elidupuis@gmail.com"},"maintainers":[{"name":"elidupuis","email":"elidupuis@gmail.com"}],"dist":{"shasum":"2ba38b46cd4c69dbf6ffc02a9e47a4f9f215c685","tarball":"https://registry.npmjs.org/semver2int/-/semver2int-0.0.1.tgz","integrity":"sha512-9pP/iEMucXN18R36wRVrBnQZ2A8xQEFSBORlR2iIVy8p/9WC+pHPtNYLtkt1vZD+rLo1G5fhN5nAUHO3fdJQHw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGiKMC0TWbhmmC7YiyP+dF8CYAd6pSCRXIh03rYSSz29AiAia6DC0sQ1kMzEUSr8TVAIu+qIxbTS+AOAHhFMPW53BQ=="}]}}},"readme":"# semver2int\n> convert a semver string to an integer for simple comparisons\n\n## Description\nAccepts a semver string and returns an integer representation.\n\nEach section of the semver (X, Y, Z) is padded to two digits. This ensures that values like `0.1.0` returns a number greater than `0.0.11`.\nThe above examples will yield *100* and *11* respectively.\n\n```js\nvar semver2int = require('semver2int');\nsemver2int('0.0.11') // 11\nsemver2int('0.1.0') // 100\nsemver2int('v1.2.3') // 10203\nsemver2int('2.1.12') // 20112\nsemver2int('1.0.0-beta+12345') // 10000\nsemver2int('1.0') // -1\nsemver2int(1.234) // -1\n```\n\n**NOTE: all prerelease information and metadata from a semver string is ignored.**\n\nThis is obviously a gross simplification of a semver string, but sometimes you just want a number for simple comparisons. \n \n## Limitations\nThe resulting integer will be between 0 and 999999. A return value of *-1* implies:\n\n- an invalid semver string (such as 1.0).\n- the major, minor, or patch number is greater than 99. (such as 1.1.100).\n- the passed argument is not a string.\n","maintainers":[{"name":"elidupuis","email":"elidupuis@gmail.com"}],"time":{"modified":"2022-06-26T17:33:56.519Z","created":"2015-04-05T21:05:59.055Z","0.0.1":"2015-04-05T21:05:59.055Z"},"homepage":"https://github.com/elidupuis/semver2int","keywords":["semver","int","number","convert","compare"],"repository":{"type":"git","url":"https://github.com/elidupuis/semver2int.git"},"author":{"name":"Eli Dupuis","email":"elidupuis@gmail.com"},"bugs":{"url":"https://github.com/elidupuis/semver2int/issues"},"license":"ISC","readmeFilename":"README.md"}