MCPcopy
hub / github.com/npm/node-semver / help

Function help

bin/semver.js:143–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141const fail = () => process.exit(1)
142
143const help = () => console.log(
144`SemVer ${version}
145
146A JavaScript implementation of the https://semver.org/ specification
147Copyright Isaac Z. Schlueter
148
149Usage: semver [options] <version> [<version> [...]]
150Prints valid versions sorted by SemVer precedence
151
152Options:
153-r --range <range>
154 Print versions that match the specified range.
155
156-i --increment [<level>]
157 Increment a version by the specified level. Level can
158 be one of: major, minor, patch, premajor, preminor,
159 prepatch, prerelease, or release. Default level is 'patch'.
160 Only one version may be specified.
161
162--preid <identifier>
163 Identifier to be used to prefix premajor, preminor,
164 prepatch or prerelease version increments.
165
166-l --loose
167 Interpret versions and ranges loosely
168
169-p --include-prerelease
170 Always include prerelease versions in range matching
171
172-c --coerce
173 Coerce a string into SemVer if possible
174 (does not imply --loose)
175
176--rtl
177 Coerce version strings right to left
178
179--ltr
180 Coerce version strings left to right (default)
181
182-n <base>
183 Base number to be used for the prerelease identifier.
184 Can be either 0 or 1, or false to omit the number altogether.
185 Defaults to 0.
186
187Program exits successfully if any valid version satisfies
188all supplied ranges, and prints all satisfying versions.
189
190If no satisfying versions are found, then exits failure.
191
192Versions are printed in ascending order, so supplying
193multiple versions to the utility will just sort them.`)
194
195main()

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected