import * as eitherway from "https://deno.land/x/eitherway@0.10.0/dev_deps.ts";
A library of assertion functions.
If the assertion is false an AssertionError
will be thrown which will
result in pretty-printed diff of failing assertion.
This module is browser compatible, but do not rely on good formatting of values for AssertionError messages in browsers.
Namespaces
The semantic version parser. |
Variables
A comparator which will span all valid semantic versions | |
ANY is a sentinel value used by some range calculations. It is not a valid SemVer object and should not be used directly. | |
A sentinel value used to denote an invalid SemVer object which may be the result of impossible ranges or comparator operations. | |
MAX is a sentinel value used by some range calculations.
It is equivalent to | |
The minimum valid SemVer object. Equivalent to | |
A comparator which will not span any semantic versions | |
Functions
Make an assertion, error will be thrown if | |
Make an assertion that | |
Make an assertion that | |
Make an assertion that | |
Make an assertion that actual is not null or undefined. If not then throw. | |
Make an assertion, error will be thrown if | |
Make an assertion that | |
Make an assertion that | |
Make an assertion that | |
Make an assertion that | |
Make an assertion that | |
Make an assertion that | |
Make an assertion that | |
Make an assertion that | |
Make an assertion that | |
Make an assertion that | |
Make an assertion that | |
Make an assertion that | |
Executes a function which returns a promise, expecting it to reject. | |
Make an assertion that | |
Make an assertion that actual includes expected. If not then throw. | |
Executes a function, expecting it to throw. If it does not, then it throws. | |
Asserts at compile time that the provided type argument's type resolves to the expected boolean literal type. | |
Builds the specified Deno module to an npm package using the TypeScript compiler. | |
Ensures that a directory is empty.
Deletes directory contents if the directory is not empty.
If the directory does not exist, it is created.
The directory itself is not deleted.
Requires the | |
Deep equality comparison used in assertions | |
f fail | Forcefully throws a failed assertion |
Do a comparison of two semantic version objects based on the given operator | |
Formats the comparator into a string | |
Returns true if the range of possible versions intersects with the other comparators set of possible versions | |
The maximum version that could match this comparator. | |
The minimum semantic version that could match this comparator | |
Compare two semantic version objects. | |
Compare two semantic version objects including build metadata. | |
Returns difference between two versions by the release type, or
| |
Returns | |
Format a SemVer object into a string. | |
Greater than comparison | |
Greater than or equal to comparison | |
Checks to see if the version is greater than all possible versions of the range. | |
Returns the new version resulting from an increment by release type. | |
Checks to see if value is a valid SemVer object. It does a check into each field including prerelease and build. | |
Does a deep check on the value to see if it is a valid SemVerComparator object. | |
Does a deep check on the object to determine if its a valid range. | |
Less than comparison | |
Less than or equal to comparison | |
Greater than range comparison | |
Returns the highest version in the list that satisfies the range, or | |
Returns the lowest version in the list that satisfies the range, or | |
Not equal comparison | |
Returns true if the version is outside the bounds of the range in either the
high or low direction. The hilo argument must be either the string '>' or
'<'. (This is the function called by | |
Attempt to parse a string as a semantic version, returning either a | |
Parses a comparator string into a valid SemVerComparator. | |
Parses a range string into a SemVerRange object or throws a TypeError. | |
Formats the range into a string | |
The ranges intersect every range of AND comparators intersects with a least one range of OR ranges. | |
The maximum valid SemVer for a given range or INVALID | |
The minimum valid SemVer for a given range or INVALID | |
A reverse comparison of two versions. Same as compare but
| |
Sorts a list of semantic versions in descending order. | |
Sorts a list of semantic versions in ascending order. | |
Test to see if a semantic version falls within the range of the comparator. | |
Test to see if the version satisfies the range. | |
Use this to stub out methods that will throw when invoked. | |
Use this to assert unreachable code. |
Interfaces
A SemVer object parsed into its constituent parts. | |
The shape of a valid semantic version comparator | |
A type representing a semantic version range. The ranges consist of a nested array, which represents a set of OR comparisons while the inner array represents AND comparisons. |
Type Aliases
Asserts at compile time that the provided type argument's type resolves to the expected boolean literal type. | |
Asserts at compile time that the provided type argument's type resolves to false. | |
Asserts at compile time that the provided type argument's type resolves to true. | |
T Has | Checks if type |
Checks if type | |
Checks if type | |
Checks if type | |
Checks if type | |
Checks if type | |
Checks if type | |
The style to use when formatting a SemVer object into a string | |
SemVer comparison operators. | |
The possible release types are used as an operator for the increment function and as a result of the difference function. |