qstd 0.2.7 → 0.2.9

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.
@@ -65,27 +65,27 @@ __export(dict_exports, {
65
65
  function byteSizeOfObj(o) {
66
66
  const objectList = [];
67
67
  const stack = [o];
68
- const bytes = [0];
68
+ let bytes = 0;
69
69
  while (stack.length) {
70
70
  const value = stack.pop();
71
- if (value == null) bytes[0] += 4;
72
- else if (typeof value === "boolean") bytes[0] += 4;
73
- else if (typeof value === "string") bytes[0] += value.length * 2;
74
- else if (typeof value === "number") bytes[0] += 8;
71
+ if (value == null) bytes += 4;
72
+ else if (typeof value === "boolean") bytes += 4;
73
+ else if (typeof value === "string") bytes += value.length * 2;
74
+ else if (typeof value === "number") bytes += 8;
75
75
  else if (typeof value === "object" && objectList.indexOf(value) === -1) {
76
76
  objectList.push(value);
77
- if (typeof value.byteLength === "number") bytes[0] += value.byteLength;
77
+ if (typeof value.byteLength === "number") bytes += value.byteLength;
78
78
  else if (value[Symbol.iterator]) {
79
79
  for (const v of value) stack.push(v);
80
80
  } else {
81
81
  Object.keys(value).forEach((k) => {
82
- bytes[0] += k.length * 2;
82
+ bytes += k.length * 2;
83
83
  stack.push(value[k]);
84
84
  });
85
85
  }
86
86
  }
87
87
  }
88
- return bytes[0];
88
+ return bytes;
89
89
  }
90
90
  var filter = (r, predicate) => Object.entries(r).reduce(
91
91
  (store, [key, value]) => predicate(value) ? { ...store, [key]: value } : store,
@@ -134,11 +134,11 @@ var omit = (r, paths) => {
134
134
  // src/shared/str.ts
135
135
  var str_exports = {};
136
136
  __export(str_exports, {
137
+ changeCase: () => changeCase,
137
138
  concat: () => concat,
138
139
  countChar: () => countChar,
139
140
  countWords: () => countWords,
140
- createSentences: () => createSentences,
141
- toCase: () => toCase
141
+ createSentences: () => createSentences
142
142
  });
143
143
  var createSentences = (text) => {
144
144
  if (!text) return [];
@@ -159,7 +159,7 @@ var concat = (xs, delimiter) => {
159
159
  var countChar = (str, ch) => {
160
160
  return str.split("").reduce((x, y) => y === ch ? x + 1 : x, 0);
161
161
  };
162
- var toCase = (text, opts) => {
162
+ var changeCase = (text, opts) => {
163
163
  switch (opts.to) {
164
164
  case "title":
165
165
  return text.charAt(0).toUpperCase() + text.slice(1);
@@ -1,4 +1,4 @@
1
- export { d as Dict, f as Flow, i as Int, l as List, a as Log, m as Money, r as Random, s as Str, t as Time } from '../log-DPBPow2d.cjs';
1
+ export { d as Dict, f as Flow, i as Int, l as List, a as Log, m as Money, r as Random, s as Str, t as Time } from '../log-ERvLs2Dx.cjs';
2
2
  import 'date-fns';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- export { d as Dict, f as Flow, i as Int, l as List, a as Log, m as Money, r as Random, s as Str, t as Time } from '../log-DPBPow2d.js';
1
+ export { d as Dict, f as Flow, i as Int, l as List, a as Log, m as Money, r as Random, s as Str, t as Time } from '../log-ERvLs2Dx.js';
2
2
  import 'date-fns';
3
3
 
4
4
  /**
@@ -59,27 +59,27 @@ __export(dict_exports, {
59
59
  function byteSizeOfObj(o) {
60
60
  const objectList = [];
61
61
  const stack = [o];
62
- const bytes = [0];
62
+ let bytes = 0;
63
63
  while (stack.length) {
64
64
  const value = stack.pop();
65
- if (value == null) bytes[0] += 4;
66
- else if (typeof value === "boolean") bytes[0] += 4;
67
- else if (typeof value === "string") bytes[0] += value.length * 2;
68
- else if (typeof value === "number") bytes[0] += 8;
65
+ if (value == null) bytes += 4;
66
+ else if (typeof value === "boolean") bytes += 4;
67
+ else if (typeof value === "string") bytes += value.length * 2;
68
+ else if (typeof value === "number") bytes += 8;
69
69
  else if (typeof value === "object" && objectList.indexOf(value) === -1) {
70
70
  objectList.push(value);
71
- if (typeof value.byteLength === "number") bytes[0] += value.byteLength;
71
+ if (typeof value.byteLength === "number") bytes += value.byteLength;
72
72
  else if (value[Symbol.iterator]) {
73
73
  for (const v of value) stack.push(v);
74
74
  } else {
75
75
  Object.keys(value).forEach((k) => {
76
- bytes[0] += k.length * 2;
76
+ bytes += k.length * 2;
77
77
  stack.push(value[k]);
78
78
  });
79
79
  }
80
80
  }
81
81
  }
82
- return bytes[0];
82
+ return bytes;
83
83
  }
84
84
  var filter = (r, predicate) => Object.entries(r).reduce(
85
85
  (store, [key, value]) => predicate(value) ? { ...store, [key]: value } : store,
@@ -128,11 +128,11 @@ var omit = (r, paths) => {
128
128
  // src/shared/str.ts
129
129
  var str_exports = {};
130
130
  __export(str_exports, {
131
+ changeCase: () => changeCase,
131
132
  concat: () => concat,
132
133
  countChar: () => countChar,
133
134
  countWords: () => countWords,
134
- createSentences: () => createSentences,
135
- toCase: () => toCase
135
+ createSentences: () => createSentences
136
136
  });
137
137
  var createSentences = (text) => {
138
138
  if (!text) return [];
@@ -153,7 +153,7 @@ var concat = (xs, delimiter) => {
153
153
  var countChar = (str, ch) => {
154
154
  return str.split("").reduce((x, y) => y === ch ? x + 1 : x, 0);
155
155
  };
156
- var toCase = (text, opts) => {
156
+ var changeCase = (text, opts) => {
157
157
  switch (opts.to) {
158
158
  case "title":
159
159
  return text.charAt(0).toUpperCase() + text.slice(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qstd",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "Standard Block component and utilities library with Panda CSS",
5
5
  "author": "malin1",
6
6
  "license": "MIT",
@@ -55,7 +55,7 @@
55
55
  "typecheck:perf": "tsc --noEmit --extendedDiagnostics",
56
56
  "typecheck:trace": "tsc --noEmit --generateTrace ./performance/ts-trace",
57
57
  "analyze:tsserver": "bash performance/analyze-tsserver.sh",
58
- "lint": "eslint src --ext ts,tsx"
58
+ "lint": "eslint ."
59
59
  },
60
60
  "peerDependencies": {
61
61
  "react": "^18.0.0 || ^19.0.0",
@@ -79,18 +79,21 @@
79
79
  "use-immer": "^0.11.0"
80
80
  },
81
81
  "devDependencies": {
82
+ "@eslint/js": "^9.39.1",
83
+ "@eslint/json": "^0.13.2",
82
84
  "@pandacss/dev": "^1.2.0",
85
+ "@pandacss/eslint-plugin": "^0.2.14",
83
86
  "@types/node": "^22.10.5",
84
87
  "@types/react": "^19.1.12",
85
88
  "@types/react-dom": "^19.1.8",
86
- "@typescript-eslint/eslint-plugin": "^8.41.0",
87
- "@typescript-eslint/parser": "^8.41.0",
88
- "eslint": "^9.28.0",
89
- "eslint-plugin-react-hooks": "^5.2.0",
89
+ "eslint": "^9.39.1",
90
+ "eslint-plugin-react-hooks": "^7.0.1",
91
+ "globals": "^16.2.0",
90
92
  "react": "^19.2.0",
91
93
  "react-dom": "^19.2.0",
92
94
  "tsup": "^8.0.0",
93
95
  "typescript": "^5.9.2",
96
+ "typescript-eslint": "^8.46.4",
94
97
  "vitest": "^3.1.4"
95
98
  },
96
99
  "keywords": [