source: trip-planner-front/node_modules/hdr-histogram-js/dist/HistogramBuilder.js@ fa375fe

Last change on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.0 KB
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.build = exports.defaultRequest = void 0;
4const JsHistogramFactory_1 = require("./JsHistogramFactory");
5const wasm_1 = require("./wasm");
6exports.defaultRequest = {
7 bitBucketSize: 32,
8 autoResize: true,
9 lowestDiscernibleValue: 1,
10 highestTrackableValue: 2,
11 numberOfSignificantValueDigits: 3,
12 useWebAssembly: false,
13};
14exports.build = (request = exports.defaultRequest) => {
15 const parameters = Object.assign({}, exports.defaultRequest, request);
16 if (request.useWebAssembly && wasm_1.webAssemblyAvailable) {
17 return wasm_1.WasmHistogram.build(parameters);
18 }
19 const histogramConstr = JsHistogramFactory_1.constructorFromBucketSize(parameters.bitBucketSize);
20 const histogram = new histogramConstr(parameters.lowestDiscernibleValue, parameters.highestTrackableValue, parameters.numberOfSignificantValueDigits);
21 histogram.autoResize = parameters.autoResize;
22 return histogram;
23};
24//# sourceMappingURL=HistogramBuilder.js.map
Note: See TracBrowser for help on using the repository browser.