@oyerinde/caliper 0.1.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,44 @@
1
+ 'use strict';
2
+
3
+ var chunkOSQHATBH_cjs = require('./chunk-OSQHATBH.cjs');
4
+ var chunk3W2YKDGV_cjs = require('./chunk-3W2YKDGV.cjs');
5
+
6
+ /**
7
+ * @name @oyerinde/caliper
8
+ * @author Daniel Oyerinde
9
+ * @license MIT
10
+ *
11
+ * Caliper - Browser Measurement Tool
12
+ *
13
+ * This source code is licensed under the MIT license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */
16
+
17
+ // src/preset.ts
18
+ function init(configuration, extensions = []) {
19
+ const caliperInstance = chunkOSQHATBH_cjs.createOverlay(configuration);
20
+ if (extensions && Array.isArray(extensions)) {
21
+ extensions.forEach((extension) => {
22
+ if (typeof extension === "function") {
23
+ extension(caliperInstance);
24
+ } else if (extension && typeof extension.install === "function") {
25
+ caliperInstance.use(extension);
26
+ }
27
+ });
28
+ }
29
+ return caliperInstance;
30
+ }
31
+
32
+ Object.defineProperty(exports, "caliperProps", {
33
+ enumerable: true,
34
+ get: function () { return chunkOSQHATBH_cjs.caliperProps; }
35
+ });
36
+ Object.defineProperty(exports, "CaliperAgentStateSchema", {
37
+ enumerable: true,
38
+ get: function () { return chunk3W2YKDGV_cjs.CaliperAgentStateSchema; }
39
+ });
40
+ Object.defineProperty(exports, "CaliperBridge", {
41
+ enumerable: true,
42
+ get: function () { return chunk3W2YKDGV_cjs.CaliperBridge; }
43
+ });
44
+ exports.init = init;