@featurevisor/core
Advanced tools
Comparing version 1.17.0 to 1.18.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.18.0](https://github.com/featurevisor/featurevisor/compare/v1.17.0...v1.18.0) (2024-04-16) | ||
### Features | ||
* assess traffic distribution via CLI ([#297](https://github.com/featurevisor/featurevisor/issues/297)) ([2063ad9](https://github.com/featurevisor/featurevisor/commit/2063ad9a5408071bfb1636c748cabe616065191d)) | ||
# [1.17.0](https://github.com/featurevisor/featurevisor/compare/v1.16.0...v1.17.0) (2024-04-07) | ||
@@ -8,0 +19,0 @@ |
@@ -15,1 +15,2 @@ export * from "./config"; | ||
export * from "./evaluate"; | ||
export * from "./assess-distribution"; |
@@ -31,2 +31,3 @@ "use strict"; | ||
__exportStar(require("./evaluate"), exports); | ||
__exportStar(require("./assess-distribution"), exports); | ||
//# sourceMappingURL=index.js.map |
export declare function prettyNumber(n: number): string; | ||
export declare function prettyPercentage(value: number, total: number, precision?: number, suffix?: string): string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.prettyNumber = void 0; | ||
exports.prettyPercentage = exports.prettyNumber = void 0; | ||
function prettyNumber(n) { | ||
@@ -8,2 +8,8 @@ return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); | ||
exports.prettyNumber = prettyNumber; | ||
function prettyPercentage(value, total, precision, suffix) { | ||
if (precision === void 0) { precision = 2; } | ||
if (suffix === void 0) { suffix = "%"; } | ||
return "".concat(((value / total) * 100).toFixed(precision)).concat(suffix); | ||
} | ||
exports.prettyPercentage = prettyPercentage; | ||
//# sourceMappingURL=pretty.js.map |
{ | ||
"name": "@featurevisor/core", | ||
"version": "1.17.0", | ||
"version": "1.18.0", | ||
"description": "Core package of Featurevisor for Node.js usage", | ||
@@ -60,3 +60,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "41b21ee48a1508fad58824b255403125ce175f95" | ||
"gitHead": "beedecac433ebb53ec5c856ecdf5bf8c5ea159fd" | ||
} |
@@ -15,1 +15,2 @@ export * from "./config"; | ||
export * from "./evaluate"; | ||
export * from "./assess-distribution"; |
export function prettyNumber(n: number) { | ||
return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); | ||
} | ||
export function prettyPercentage( | ||
value: number, | ||
total: number, | ||
precision: number = 2, | ||
suffix: string = "%", | ||
): string { | ||
return `${((value / total) * 100).toFixed(precision)}${suffix}`; | ||
} |
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
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
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
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
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
1063916
299
13627