import semver from "semver" ; const pkg = require ( "../package.json" ) ; const VERSION = pkg . version ; const VERSION_STABLE = VERSION . replace ( /-(\S+)/g , "" ) ; const START_TIME = new Date ( ) ; param { string } condition return { boolean } function satisfies ( condition ) { if ( semver . satisfies ( VERSION , condition ) ) return true ; if ( /-(\S+)$/ . test ( condition ) ) { return true ; } return semver . satisfies ( VERSION_STABLE , condition ) ; } export default { version : pkg . version , satisfies : satisfies , START_TIME : START_TIME , } ;