@betterer/constraints
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -1,1 +0,2 @@ | ||
export declare function bigger(current: number, previous: number): boolean; | ||
import { ConstraintResult } from './constraint-result'; | ||
export declare function bigger(current: number, previous: number): ConstraintResult; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function bigger(current, previous) { | ||
return current > previous; | ||
if (current === previous) { | ||
return "same" /* same */; | ||
} | ||
if (current > previous) { | ||
return "better" /* better */; | ||
} | ||
return "worse" /* worse */; | ||
} | ||
exports.bigger = bigger; | ||
//# sourceMappingURL=bigger.js.map |
@@ -0,2 +1,3 @@ | ||
export * from './constraint-result'; | ||
export * from './bigger'; | ||
export * from './smaller'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./constraint-result"), exports); | ||
tslib_1.__exportStar(require("./bigger"), exports); | ||
tslib_1.__exportStar(require("./smaller"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -1,1 +0,2 @@ | ||
export declare function smaller(current: number, previous: number): boolean; | ||
import { ConstraintResult } from './constraint-result'; | ||
export declare function smaller(current: number, previous: number): ConstraintResult; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function smaller(current, previous) { | ||
return current < previous; | ||
if (current === previous) { | ||
return "same" /* same */; | ||
} | ||
if (current < previous) { | ||
return "better" /* better */; | ||
} | ||
return "worse" /* worse */; | ||
} | ||
exports.smaller = smaller; | ||
//# sourceMappingURL=smaller.js.map |
{ | ||
"name": "@betterer/constraints", | ||
"description": "default constraints for @betterer/betterer", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"license": "MIT", | ||
@@ -29,3 +29,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "a04aad0c3e1d977edbb3a56431db740d6743a7ae" | ||
"gitHead": "3c68551aa5f124166607b43e2da9936a6fb0b6a0" | ||
} |
@@ -12,9 +12,11 @@ # `@betterer/constraints` | ||
bigger(1, 2); // false; | ||
bigger(1, 1); // false; | ||
bigger(2, 1); // true; | ||
bigger(1, 2); // worse; | ||
bigger(1, 1); // worse; | ||
bigger(2, 1); // better; | ||
bigger(2, 2); // same; | ||
smaller(2, 1); // false; | ||
smaller(1, 1); // false; | ||
smaller(1, 2); // true; | ||
smaller(2, 1); // worse; | ||
smaller(1, 1); // worse; | ||
smaller(1, 2); // better; | ||
smaller(2, 2); // same; | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
9695
33
106
22