@multiplatform.one/utils 10.9.0 → 10.9.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.
package/lib/dev.cjs CHANGED
@@ -181,8 +181,7 @@ function runtimeExports(root, requireFrom) {
181
181
  }
182
182
  const names = /* @__PURE__ */ new Set();
183
183
  for (const match of source.matchAll(/^export\s*\{([^}]*)\}/gm)) for (const clause of match[1].split(",")) {
184
- const words = clause.trim().split(/\s+/);
185
- const name = words[words.length - 1];
184
+ const name = clause.trim().split(/\s+/).at(-1);
186
185
  if (name) names.add(name);
187
186
  }
188
187
  for (const match of source.matchAll(/^export\s+(?:const|let|var|function|class)\s+(\w+)/gm)) names.add(match[1]);
package/lib/dev.mjs CHANGED
@@ -149,8 +149,7 @@ function runtimeExports(root, requireFrom) {
149
149
  }
150
150
  const names = /* @__PURE__ */ new Set();
151
151
  for (const match of source.matchAll(/^export\s*\{([^}]*)\}/gm)) for (const clause of match[1].split(",")) {
152
- const words = clause.trim().split(/\s+/);
153
- const name = words[words.length - 1];
152
+ const name = clause.trim().split(/\s+/).at(-1);
154
153
  if (name) names.add(name);
155
154
  }
156
155
  for (const match of source.matchAll(/^export\s+(?:const|let|var|function|class)\s+(\w+)/gm)) names.add(match[1]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/utils",
3
- "version": "10.9.0",
3
+ "version": "10.9.1",
4
4
  "description": "utilities for multiplatform.one",
5
5
  "keywords": [
6
6
  "multiplatform.one",
@@ -167,7 +167,7 @@ function runtimeExports(root: string, requireFrom: NodeRequire): Set<string> | u
167
167
  for (const match of source.matchAll(/^export\s*\{([^}]*)\}/gm)) {
168
168
  for (const clause of match[1]!.split(",")) {
169
169
  const words = clause.trim().split(/\s+/);
170
- const name = words[words.length - 1];
170
+ const name = words.at(-1);
171
171
  if (name) names.add(name);
172
172
  }
173
173
  }