@tamagui/timer 1.114.4 → 1.115.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.
@@ -3,15 +3,21 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
15
21
  var src_exports = {};
16
22
  __export(src_exports, {
17
23
  timer: () => timer
@@ -19,18 +25,16 @@ __export(src_exports, {
19
25
  module.exports = __toCommonJS(src_exports);
20
26
  function timer() {
21
27
  let runs = 0;
22
- const typesOfRuns = /* @__PURE__ */ new Set(), timings = {};
28
+ const typesOfRuns = /* @__PURE__ */new Set(),
29
+ timings = {};
23
30
  function print() {
24
31
  const typeRuns = runs / typesOfRuns.size;
25
32
  let totalTime = 0;
26
- const out = [
27
- `Ran ${typeRuns} per-type, ${runs} total`,
28
- ...[...typesOfRuns].map((name) => {
29
- const avg = `avg ${`${timings[name] / typeRuns}`.slice(0, 9).padEnd(9)}ms`, total = timings[name];
30
- return totalTime += total, `${name.slice(0, 30).padStart(31)} | ${avg} | total ${total}ms`;
31
- }),
32
- ` total ${totalTime}ms`
33
- ].join(`
33
+ const out = [`Ran ${typeRuns} per-type, ${runs} total`, ...[...typesOfRuns].map(name => {
34
+ const avg = `avg ${`${timings[name] / typeRuns}`.slice(0, 9).padEnd(9)}ms`,
35
+ total = timings[name];
36
+ return totalTime += total, `${name.slice(0, 30).padStart(31)} | ${avg} | total ${total}ms`;
37
+ }), ` total ${totalTime}ms`].join(`
34
38
  `);
35
39
  return console.info(out), out;
36
40
  }
@@ -59,5 +63,4 @@ function timer() {
59
63
  },
60
64
  print
61
65
  };
62
- }
63
- //# sourceMappingURL=index.js.map
66
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/timer",
3
- "version": "1.114.4",
3
+ "version": "1.115.0",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -18,7 +18,7 @@
18
18
  "clean:build": "tamagui-build clean:build"
19
19
  },
20
20
  "devDependencies": {
21
- "@tamagui/build": "1.114.4"
21
+ "@tamagui/build": "1.115.0"
22
22
  },
23
23
  "exports": {
24
24
  "./package.json": "./package.json",
@@ -27,7 +27,8 @@
27
27
  "react-native": "./dist/cjs/index.native.js",
28
28
  "types": "./types/index.d.ts",
29
29
  "import": "./dist/esm/index.mjs",
30
- "require": "./dist/cjs/index.js"
30
+ "require": "./dist/cjs/index.cjs",
31
+ "default": "./dist/cjs/index.native.js"
31
32
  }
32
33
  },
33
34
  "publishConfig": {
File without changes