@zthun/helpful-fn 9.1.0 → 9.4.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.
Files changed (33) hide show
  1. package/dist/detokenize/detokenize.d.mts +17 -0
  2. package/dist/index.cjs +2335 -621
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.mts +2 -0
  5. package/dist/index.js +2332 -671
  6. package/dist/index.js.map +1 -1
  7. package/dist/optional/optional.d.mts +14 -0
  8. package/dist/partial/deep-partial.d.mts +10 -2
  9. package/dist/required/required-deep.d.mts +10 -2
  10. package/dist/required/required-pick.d.mts +8 -1
  11. package/package.json +3 -3
  12. package/dist/assert/assert.spec.d.ts +0 -1
  13. package/dist/count-buckets/count-buckets.spec.d.ts +0 -1
  14. package/dist/create-error/create-error.spec.d.ts +0 -1
  15. package/dist/create-guid/create-guid.spec.d.ts +0 -1
  16. package/dist/empty/is-empty-object.spec.d.ts +0 -1
  17. package/dist/first-where/first-where.spec.d.ts +0 -1
  18. package/dist/geometry/quadrilateral-corners.spec.d.ts +0 -1
  19. package/dist/geometry/quadrilateral.spec.d.ts +0 -1
  20. package/dist/geometry/rectangle.spec.d.ts +0 -1
  21. package/dist/join-defined/join-defined.spec.d.ts +0 -1
  22. package/dist/lazy/lazy.spec.d.ts +0 -1
  23. package/dist/obligation/obligation.spec.d.ts +0 -1
  24. package/dist/peel/peel.spec.d.ts +0 -1
  25. package/dist/pick/pick.spec.d.ts +0 -1
  26. package/dist/purge/purge.spec.d.ts +0 -1
  27. package/dist/serialize/deserialize-json.spec.d.ts +0 -1
  28. package/dist/serialize/deserialize-try.spec.d.ts +0 -1
  29. package/dist/serialize/serialize-json.spec.d.ts +0 -1
  30. package/dist/set-first/set-first.spec.d.ts +0 -1
  31. package/dist/sleep/sleep.spec.d.ts +0 -1
  32. package/dist/tag/tag.spec.d.ts +0 -1
  33. package/dist/try-fallback/try-fallback.spec.d.ts +0 -1
@@ -0,0 +1,17 @@
1
+ import { ZOptional } from '../optional/optional.mjs';
2
+ /**
3
+ * Does replacement of interpolation, ${}, tokens in a string.
4
+ *
5
+ * @param tokenized -
6
+ * The string that can contain interpolation tokens.
7
+ * @param tokens -
8
+ * The tokens to replace.
9
+ *
10
+ * @returns
11
+ * A detokenized string that replaces the tokens with the values
12
+ * in the token dictionary. If a value is missing in the token dictionary,
13
+ * then the tokens are preserved. If the value of a token is null or
14
+ * undefined explicitly, then any tokens in the tokenized string are
15
+ * removed for that value.
16
+ */
17
+ export declare function detokenize(tokenized: ZOptional<string>, tokens: Record<string, ZOptional<string>>): string;