Skip to content

Commit

Permalink
feat(prerelease-id-from-version): Add JSDoc types
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Dec 9, 2020
1 parent fae9e8d commit 53cdad9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ const semver = require("semver");

module.exports.prereleaseIdFromVersion = prereleaseIdFromVersion;

/**
* @param {string} version
* @returns {string|undefined}
*/
function prereleaseIdFromVersion(version) {
return (semver.prerelease(version) || []).shift();
}

0 comments on commit 53cdad9

Please sign in to comment.