New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

flexver

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flexver

A SemVer-compatible intuitive comparator for free-form versioning strings as seen in the wild, designed to sort versions like people do.

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
372
34.3%
Maintainers
1
Weekly downloads
 
Created
Source

FlexVer-JS

A basic JavaScript implementation of FlexVer. Does not use "modern" JavaScript syntax, and so should work anywhere, as long as String.codePointAt is defined.

Getting it

You can either copy and rename index.js wholesale into your project, or retrieve it from NPM, where the package is flexver. In dist, there are three files; browser.js, module.js, and node.js, for different target platforms.

Usage

In the browser, a flexVerCompare function is added to the window object. It accepts two strings, and returns a negative number for a < b, 0 for a == b, and a positive number for a > b.

In Node, a function is exported from the module that works the same as described above.

Keywords

semver

FAQs

Package last updated on 23 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts