@oyerinde/caliper 0.1.4 → 0.2.1

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 chunkP37B6G5P_cjs = require('./chunk-P37B6G5P.cjs');
4
+ var chunkPYAVLOZM_cjs = require('./chunk-PYAVLOZM.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 = chunkP37B6G5P_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 chunkP37B6G5P_cjs.caliperProps; }
35
+ });
36
+ Object.defineProperty(exports, "CaliperAgentStateSchema", {
37
+ enumerable: true,
38
+ get: function () { return chunkPYAVLOZM_cjs.CaliperAgentStateSchema; }
39
+ });
40
+ Object.defineProperty(exports, "CaliperBridge", {
41
+ enumerable: true,
42
+ get: function () { return chunkPYAVLOZM_cjs.CaliperBridge; }
43
+ });
44
+ exports.init = init;