@betterer/constraints
Advanced tools
Comparing version 3.1.1 to 4.0.0
@@ -6,2 +6,44 @@ # Change Log | ||
# [4.0.0](https://github.com/phenomnomnominal/betterer/compare/v3.1.2...v4.0.0) (2021-02-27) | ||
### Bug Fixes | ||
* **docs 📚:** restore header image ([#544](https://github.com/phenomnomnominal/betterer/issues/544)) ([e30a941](https://github.com/phenomnomnominal/betterer/commit/e30a941cc8badd79c4eaf505449ed56fda1be1bf)) | ||
### Code Refactoring | ||
* **betterer 🔧:** rewrite pretty much everything v4.0.0 ([#543](https://github.com/phenomnomnominal/betterer/issues/543)) ([48b85bd](https://github.com/phenomnomnominal/betterer/commit/48b85bd9482cb42673556917508ac741ab970587)), closes [#223](https://github.com/phenomnomnominal/betterer/issues/223) [#227](https://github.com/phenomnomnominal/betterer/issues/227) [#233](https://github.com/phenomnomnominal/betterer/issues/233) [#234](https://github.com/phenomnomnominal/betterer/issues/234) [#235](https://github.com/phenomnomnominal/betterer/issues/235) [#236](https://github.com/phenomnomnominal/betterer/issues/236) [#237](https://github.com/phenomnomnominal/betterer/issues/237) [#226](https://github.com/phenomnomnominal/betterer/issues/226) [#238](https://github.com/phenomnomnominal/betterer/issues/238) [#239](https://github.com/phenomnomnominal/betterer/issues/239) [#240](https://github.com/phenomnomnominal/betterer/issues/240) [#243](https://github.com/phenomnomnominal/betterer/issues/243) [#248](https://github.com/phenomnomnominal/betterer/issues/248) [#250](https://github.com/phenomnomnominal/betterer/issues/250) [#251](https://github.com/phenomnomnominal/betterer/issues/251) [#254](https://github.com/phenomnomnominal/betterer/issues/254) [#255](https://github.com/phenomnomnominal/betterer/issues/255) [#257](https://github.com/phenomnomnominal/betterer/issues/257) [#267](https://github.com/phenomnomnominal/betterer/issues/267) [#268](https://github.com/phenomnomnominal/betterer/issues/268) [#271](https://github.com/phenomnomnominal/betterer/issues/271) [#272](https://github.com/phenomnomnominal/betterer/issues/272) [#273](https://github.com/phenomnomnominal/betterer/issues/273) [#276](https://github.com/phenomnomnominal/betterer/issues/276) [#310](https://github.com/phenomnomnominal/betterer/issues/310) [#314](https://github.com/phenomnomnominal/betterer/issues/314) [#315](https://github.com/phenomnomnominal/betterer/issues/315) [#316](https://github.com/phenomnomnominal/betterer/issues/316) [#317](https://github.com/phenomnomnominal/betterer/issues/317) [#320](https://github.com/phenomnomnominal/betterer/issues/320) [#321](https://github.com/phenomnomnominal/betterer/issues/321) [#322](https://github.com/phenomnomnominal/betterer/issues/322) [#327](https://github.com/phenomnomnominal/betterer/issues/327) [#328](https://github.com/phenomnomnominal/betterer/issues/328) [#330](https://github.com/phenomnomnominal/betterer/issues/330) [#331](https://github.com/phenomnomnominal/betterer/issues/331) [#336](https://github.com/phenomnomnominal/betterer/issues/336) [#338](https://github.com/phenomnomnominal/betterer/issues/338) [#350](https://github.com/phenomnomnominal/betterer/issues/350) [#339](https://github.com/phenomnomnominal/betterer/issues/339) [#367](https://github.com/phenomnomnominal/betterer/issues/367) [#370](https://github.com/phenomnomnominal/betterer/issues/370) [#399](https://github.com/phenomnomnominal/betterer/issues/399) [#400](https://github.com/phenomnomnominal/betterer/issues/400) [#401](https://github.com/phenomnomnominal/betterer/issues/401) [#402](https://github.com/phenomnomnominal/betterer/issues/402) [#403](https://github.com/phenomnomnominal/betterer/issues/403) [#404](https://github.com/phenomnomnominal/betterer/issues/404) [#410](https://github.com/phenomnomnominal/betterer/issues/410) [#411](https://github.com/phenomnomnominal/betterer/issues/411) [#412](https://github.com/phenomnomnominal/betterer/issues/412) [#414](https://github.com/phenomnomnominal/betterer/issues/414) [#453](https://github.com/phenomnomnominal/betterer/issues/453) [#454](https://github.com/phenomnomnominal/betterer/issues/454) [#455](https://github.com/phenomnomnominal/betterer/issues/455) [#456](https://github.com/phenomnomnominal/betterer/issues/456) [#467](https://github.com/phenomnomnominal/betterer/issues/467) [#468](https://github.com/phenomnomnominal/betterer/issues/468) [#457](https://github.com/phenomnomnominal/betterer/issues/457) [#482](https://github.com/phenomnomnominal/betterer/issues/482) [#483](https://github.com/phenomnomnominal/betterer/issues/483) [#485](https://github.com/phenomnomnominal/betterer/issues/485) [#486](https://github.com/phenomnomnominal/betterer/issues/486) [#489](https://github.com/phenomnomnominal/betterer/issues/489) [#490](https://github.com/phenomnomnominal/betterer/issues/490) [#492](https://github.com/phenomnomnominal/betterer/issues/492) [#493](https://github.com/phenomnomnominal/betterer/issues/493) [#494](https://github.com/phenomnomnominal/betterer/issues/494) [#495](https://github.com/phenomnomnominal/betterer/issues/495) [#496](https://github.com/phenomnomnominal/betterer/issues/496) [#498](https://github.com/phenomnomnominal/betterer/issues/498) [#502](https://github.com/phenomnomnominal/betterer/issues/502) [#503](https://github.com/phenomnomnominal/betterer/issues/503) [#504](https://github.com/phenomnomnominal/betterer/issues/504) [#505](https://github.com/phenomnomnominal/betterer/issues/505) [#520](https://github.com/phenomnomnominal/betterer/issues/520) [#526](https://github.com/phenomnomnominal/betterer/issues/526) [#530](https://github.com/phenomnomnominal/betterer/issues/530) [#533](https://github.com/phenomnomnominal/betterer/issues/533) [#539](https://github.com/phenomnomnominal/betterer/issues/539) [#540](https://github.com/phenomnomnominal/betterer/issues/540) [#542](https://github.com/phenomnomnominal/betterer/issues/542) [#541](https://github.com/phenomnomnominal/betterer/issues/541) | ||
### BREAKING CHANGES | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* chore(betterer 🕸): remove check for completed eslint rules | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
## [3.1.1](https://github.com/phenomnomnominal/betterer/compare/v3.1.0...v3.1.1) (2020-10-29) | ||
@@ -8,0 +50,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { ConstraintResult } from './constraint-result'; | ||
export declare function bigger(result: number, expected: number): ConstraintResult; | ||
import { BettererConstraintResult } from './constraint-result'; | ||
export declare function bigger(result: number, expected: number): BettererConstraintResult; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.bigger = void 0; | ||
var constraint_result_1 = require("./constraint-result"); | ||
const constraint_result_1 = require("./constraint-result"); | ||
function bigger(result, expected) { | ||
if (result === expected) { | ||
return constraint_result_1.ConstraintResult.same; | ||
return constraint_result_1.BettererConstraintResult.same; | ||
} | ||
if (result > expected) { | ||
return constraint_result_1.ConstraintResult.better; | ||
return constraint_result_1.BettererConstraintResult.better; | ||
} | ||
return constraint_result_1.ConstraintResult.worse; | ||
return constraint_result_1.BettererConstraintResult.worse; | ||
} | ||
exports.bigger = bigger; | ||
//# sourceMappingURL=bigger.js.map |
@@ -1,2 +0,2 @@ | ||
export declare enum ConstraintResult { | ||
export declare enum BettererConstraintResult { | ||
better = "better", | ||
@@ -3,0 +3,0 @@ same = "same", |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ConstraintResult = void 0; | ||
var ConstraintResult; | ||
(function (ConstraintResult) { | ||
ConstraintResult["better"] = "better"; | ||
ConstraintResult["same"] = "same"; | ||
ConstraintResult["worse"] = "worse"; | ||
})(ConstraintResult = exports.ConstraintResult || (exports.ConstraintResult = {})); | ||
exports.BettererConstraintResult = void 0; | ||
var BettererConstraintResult; | ||
(function (BettererConstraintResult) { | ||
BettererConstraintResult["better"] = "better"; | ||
BettererConstraintResult["same"] = "same"; | ||
BettererConstraintResult["worse"] = "worse"; | ||
})(BettererConstraintResult = exports.BettererConstraintResult || (exports.BettererConstraintResult = {})); | ||
//# sourceMappingURL=constraint-result.js.map |
@@ -1,3 +0,3 @@ | ||
export { ConstraintResult } from './constraint-result'; | ||
export { BettererConstraintResult } from './constraint-result'; | ||
export { bigger } from './bigger'; | ||
export { smaller } from './smaller'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.smaller = exports.bigger = exports.ConstraintResult = void 0; | ||
exports.smaller = exports.bigger = exports.BettererConstraintResult = void 0; | ||
var constraint_result_1 = require("./constraint-result"); | ||
Object.defineProperty(exports, "ConstraintResult", { enumerable: true, get: function () { return constraint_result_1.ConstraintResult; } }); | ||
Object.defineProperty(exports, "BettererConstraintResult", { enumerable: true, get: function () { return constraint_result_1.BettererConstraintResult; } }); | ||
var bigger_1 = require("./bigger"); | ||
@@ -7,0 +7,0 @@ Object.defineProperty(exports, "bigger", { enumerable: true, get: function () { return bigger_1.bigger; } }); |
@@ -1,2 +0,2 @@ | ||
import { ConstraintResult } from './constraint-result'; | ||
export declare function smaller(result: number, expected: number): ConstraintResult; | ||
import { BettererConstraintResult } from './constraint-result'; | ||
export declare function smaller(result: number, expected: number): BettererConstraintResult; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.smaller = void 0; | ||
var constraint_result_1 = require("./constraint-result"); | ||
const constraint_result_1 = require("./constraint-result"); | ||
function smaller(result, expected) { | ||
if (result === expected) { | ||
return constraint_result_1.ConstraintResult.same; | ||
return constraint_result_1.BettererConstraintResult.same; | ||
} | ||
if (result < expected) { | ||
return constraint_result_1.ConstraintResult.better; | ||
return constraint_result_1.BettererConstraintResult.better; | ||
} | ||
return constraint_result_1.ConstraintResult.worse; | ||
return constraint_result_1.BettererConstraintResult.worse; | ||
} | ||
exports.smaller = smaller; | ||
//# sourceMappingURL=smaller.js.map |
{ | ||
"name": "@betterer/constraints", | ||
"description": "default constraints for @betterer/betterer", | ||
"version": "3.1.1", | ||
"version": "4.0.0", | ||
"license": "MIT", | ||
@@ -24,8 +24,12 @@ "publishConfig": { | ||
"scripts": { | ||
"compile": "tsc -b ." | ||
"compile": "tsc -b .", | ||
"api": "ts-api-guardian --out ../../goldens/api/@betterer/constraints.d.ts dist/index.d.ts" | ||
}, | ||
"engines": { | ||
"node": ">=12" | ||
}, | ||
"dependencies": { | ||
"tslib": "^2.0.3" | ||
}, | ||
"gitHead": "1367466c849e75733e87ce55c4e84e44a173324e" | ||
"gitHead": "e4068ade2596567bc53c6486280af3d882b40aa7" | ||
} |
@@ -1,2 +0,2 @@ | ||
[![Betterer](https://raw.githubusercontent.com/phenomnomnominal/betterer/master/docs/logo.png)](https://phenomnomnominal.github.io/betterer/) | ||
[![Betterer](https://raw.githubusercontent.com/phenomnomnominal/betterer/master/website/static/img/header.png)](https://phenomnomnominal.github.io/betterer/) | ||
@@ -9,24 +9,4 @@ # `@betterer/constraints` | ||
## Usage | ||
## Docs | ||
### Bigger | ||
```typescript | ||
import { bigger } from '@betterer/constraints'; | ||
bigger(1, 2); // worse; | ||
bigger(1, 1); // worse; | ||
bigger(2, 1); // better; | ||
bigger(2, 2); // same; | ||
``` | ||
### Smaller | ||
```typescript | ||
import { smaller } from '@betterer/constraints'; | ||
smaller(2, 1); // worse; | ||
smaller(1, 1); // worse; | ||
smaller(1, 2); // better; | ||
smaller(2, 2); // same; | ||
``` | ||
[Check out the docs at `phenomnomnominal.github.io/betterer`! 🎉](https://phenomnomnominal.github.io/betterer/docs/constraints) |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14217
12