JSPM

version-sorter

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q32248F
  • License MIT

NodeJS port of 'VersionSorter by pope'.

Package Exports

  • version-sorter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (version-sorter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

VersionSorter

This module is a NodeJS port of Ruby version By pope.

var VersionSorter = require('version-sorter')
var versions = ['1.0.9', '2.0', '1.0.10', '1.0.3']
VersionSorter.rsort(versions) // ["2.0", "1.0.10", "1.0.9", "1.0.3"]
VersionSorter.sort(versions)  // ["1.0.3", "1.0.9", "1.0.10", "2.0"]

Great thanks to @pope

Install

$ npm install version-sorter