@envdoctor/utils
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

@envdoctor/utils

Common utils for Envdoctor

Install

yarn add @envdoctor/core @envdoctor/utils -D

Contains

const execa = require("execa");

(async () => {
  const { stdout } = await execa("echo", ["unicorns"]);
  console.log(stdout);
  //=> 'unicorns'
})();
const semver = require("semver");

semver.valid("1.2.3"); // '1.2.3'
semver.valid("a.b.c"); // null
semver.clean("  =v1.2.3   "); // '1.2.3'
semver.satisfies("1.2.3", "1.x || >=2.5.0 || 5.0.0 - 7.2.3"); // true
semver.gt("1.2.3", "9.8.7"); // false
semver.lt("1.2.3", "9.8.7"); // true
semver.valid(semver.coerce("v2")); // '2.0.0'
semver.valid(semver.coerce("42.6.7.9.3-alpha")); // '42.6.7'

Readme

Keywords

none

Package Sidebar

Install

npm i @envdoctor/utils

Weekly Downloads

2

Version

2.0.2

License

MIT

Unpacked Size

2.93 kB

Total Files

5

Last publish

Collaborators

  • jukben