@orioro/util 0.8.0 → 0.9.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.
package/dist/index.d.ts CHANGED
@@ -8,3 +8,4 @@ export * from './switchValue';
8
8
  export * from './typeOf';
9
9
  export * from './validate';
10
10
  export * from './crawling';
11
+ export * from './normalizeString';
package/dist/index.mjs CHANGED
@@ -1619,4 +1619,12 @@ function fetchAllPages(_a) {
1619
1619
  });
1620
1620
  }
1621
1621
 
1622
- export { PromiseLikeEventEmitter, SKIPPED, TimeoutError, ValidationError, batchFn, debugFn, deepFreeze, fetchAllPages, inMemoryDataStore, interpolate, makeTypeOf, maybeFn, paginatedHttpFetch, parseBatchedResults, pickPaths, promiseReduce, resolveNestedPromises, switchExec, switchValue, typeMap, typeOf, validate, validateAsync, wait, withTimeout };
1622
+ function normalizeString(str) {
1623
+ return str.normalize('NFD') // Decompose accented characters
1624
+ .replace(/[\u0300-\u036f]/g, '') // Remove diacritical marks
1625
+ .toLowerCase() // Convert to lowercase
1626
+ .replace(/\s+/g, '-') // Replace multiple spaces with a single space
1627
+ .trim(); // Trim leading and trailing spaces
1628
+ }
1629
+
1630
+ export { PromiseLikeEventEmitter, SKIPPED, TimeoutError, ValidationError, batchFn, debugFn, deepFreeze, fetchAllPages, inMemoryDataStore, interpolate, makeTypeOf, maybeFn, normalizeString, paginatedHttpFetch, parseBatchedResults, pickPaths, promiseReduce, resolveNestedPromises, switchExec, switchValue, typeMap, typeOf, validate, validateAsync, wait, withTimeout };
@@ -0,0 +1 @@
1
+ export declare function normalizeString(str: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orioro/util",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "packageManager": "yarn@4.0.2",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",