@stryke/json 0.11.0 → 0.12.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 (160) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/canonical-3PQxSh5G.d.cts +17 -0
  3. package/dist/canonical-3PQxSh5G.d.cts.map +1 -0
  4. package/dist/canonical-CVbmCnGM.mjs +28 -0
  5. package/dist/canonical-CVbmCnGM.mjs.map +1 -0
  6. package/dist/canonical-DZDrZ9dv.d.mts +17 -0
  7. package/dist/canonical-DZDrZ9dv.d.mts.map +1 -0
  8. package/dist/canonical-hMXtzPIV.cjs +33 -0
  9. package/dist/canonical.cjs +3 -0
  10. package/dist/canonical.d.cts +2 -0
  11. package/dist/canonical.d.mts +2 -0
  12. package/dist/canonical.mjs +3 -0
  13. package/dist/{code-frames-BUtrssZ5.d.cts → code-frames-BOS_tt9F.d.mts} +1 -1
  14. package/dist/{code-frames-CrTAYYSE.d.mts.map → code-frames-BOS_tt9F.d.mts.map} +1 -1
  15. package/dist/{code-frames-DuBfTMu4.mjs → code-frames-C8DEdLmV.mjs} +1 -1
  16. package/dist/{code-frames-DuBfTMu4.mjs.map → code-frames-C8DEdLmV.mjs.map} +1 -1
  17. package/dist/{code-frames-CrTAYYSE.d.mts → code-frames-ClyQ9O1l.d.cts} +1 -1
  18. package/dist/{code-frames-BUtrssZ5.d.cts.map → code-frames-ClyQ9O1l.d.cts.map} +1 -1
  19. package/dist/{find-reference-B8xshNXL.d.mts → find-reference-BuuNqqOh.d.cts} +1 -1
  20. package/dist/{find-reference-B8xshNXL.d.mts.map → find-reference-BuuNqqOh.d.cts.map} +1 -1
  21. package/dist/{find-reference-De5vBQV2.cjs → find-reference-Ct8UDBo2.cjs} +2 -2
  22. package/dist/{find-reference-C-YleCds.d.cts → find-reference-MHRH7HJ_.d.mts} +1 -1
  23. package/dist/{find-reference-C-YleCds.d.cts.map → find-reference-MHRH7HJ_.d.mts.map} +1 -1
  24. package/dist/{find-reference-DMSYEaaI.mjs → find-reference-kPgdulJ1.mjs} +3 -3
  25. package/dist/{find-reference-DMSYEaaI.mjs.map → find-reference-kPgdulJ1.mjs.map} +1 -1
  26. package/dist/index.cjs +16 -11
  27. package/dist/index.d.cts +12 -11
  28. package/dist/index.d.mts +13 -12
  29. package/dist/index.mjs +13 -12
  30. package/dist/{is-number-BIwzZzyi.mjs → is-number-BMxmACAS.mjs} +1 -1
  31. package/dist/{is-number-BIwzZzyi.mjs.map → is-number-BMxmACAS.mjs.map} +1 -1
  32. package/dist/{is-object-BpfmzHWa.mjs → is-object-BYxzKTYU.mjs} +2 -2
  33. package/dist/{is-object-BpfmzHWa.mjs.map → is-object-BYxzKTYU.mjs.map} +1 -1
  34. package/dist/{is-object-umGh91v1.cjs → is-object-BbRMEXAo.cjs} +1 -1
  35. package/dist/{is-set-object-BmHip9em.cjs → is-set-object-5lZPw_Pq.cjs} +3 -3
  36. package/dist/{is-set-object-C1Qnj1Q8.mjs → is-set-object-yxjp5vg-.mjs} +4 -4
  37. package/dist/{is-set-object-C1Qnj1Q8.mjs.map → is-set-object-yxjp5vg-.mjs.map} +1 -1
  38. package/dist/{is-string-CLiBUSKV.mjs → is-string--ny35huw.mjs} +1 -1
  39. package/dist/{is-string-CLiBUSKV.mjs.map → is-string--ny35huw.mjs.map} +1 -1
  40. package/dist/{is-undefined-CmyJWYGD.mjs → is-undefined-CqNzBssC.mjs} +1 -1
  41. package/dist/{is-undefined-CmyJWYGD.mjs.map → is-undefined-CqNzBssC.mjs.map} +1 -1
  42. package/dist/{parse-vw_qRD3F.mjs → parse-B3NfTO06.mjs} +3 -3
  43. package/dist/{parse-vw_qRD3F.mjs.map → parse-B3NfTO06.mjs.map} +1 -1
  44. package/dist/{parse-Bp6kkcQ4.cjs → parse-BSmqrTy_.cjs} +2 -2
  45. package/dist/{parse-Dn43ZK9y.mjs → parse-BrChHTWb.mjs} +2 -2
  46. package/dist/{parse-Dn43ZK9y.mjs.map → parse-BrChHTWb.mjs.map} +1 -1
  47. package/dist/{parse-ByDxRup5.cjs → parse-CX9jPskm.cjs} +1 -1
  48. package/dist/{parse-DZfi3d96.d.cts → parse-DCHSu_0u.d.cts} +1 -1
  49. package/dist/{parse-Cj-YfhrI.d.mts.map → parse-DCHSu_0u.d.cts.map} +1 -1
  50. package/dist/{parse-Cj-YfhrI.d.mts → parse-DaiwKCLz.d.mts} +1 -1
  51. package/dist/{parse-DZfi3d96.d.cts.map → parse-DaiwKCLz.d.mts.map} +1 -1
  52. package/dist/{parse-BGlhbY16.d.cts → parse-XXQfTfNE.d.mts} +1 -1
  53. package/dist/{parse-BGlhbY16.d.cts.map → parse-XXQfTfNE.d.mts.map} +1 -1
  54. package/dist/{parse-error-DpEv3vo_.d.mts → parse-error-CDt01Gvc.d.mts} +1 -1
  55. package/dist/parse-error-CDt01Gvc.d.mts.map +1 -0
  56. package/dist/{parse-error-7K8s4vWf.d.cts → parse-error-CGKcBkMJ.d.cts} +1 -1
  57. package/dist/parse-error-CGKcBkMJ.d.cts.map +1 -0
  58. package/dist/{parse-error-N7UE-HMh.cjs → parse-error-CUOf-YBA.cjs} +2 -2
  59. package/dist/{parse-error-Af4zHUQ_.mjs → parse-error-Cu6mjBS7.mjs} +2 -2
  60. package/dist/{parse-error-Af4zHUQ_.mjs.map → parse-error-Cu6mjBS7.mjs.map} +1 -1
  61. package/dist/{parse-fXy5pbmE.d.mts → parse-ygKFNauQ.d.cts} +1 -1
  62. package/dist/{parse-fXy5pbmE.d.mts.map → parse-ygKFNauQ.d.cts.map} +1 -1
  63. package/dist/pointer/find-reference.cjs +1 -1
  64. package/dist/pointer/find-reference.d.cts +1 -1
  65. package/dist/pointer/find-reference.d.mts +1 -1
  66. package/dist/pointer/find-reference.mjs +1 -1
  67. package/dist/pointer/index.cjs +3 -3
  68. package/dist/pointer/index.d.cts +2 -2
  69. package/dist/pointer/index.d.mts +2 -2
  70. package/dist/pointer/index.mjs +3 -3
  71. package/dist/pointer/parse.cjs +1 -1
  72. package/dist/pointer/parse.d.cts +1 -1
  73. package/dist/pointer/parse.d.mts +1 -1
  74. package/dist/pointer/parse.mjs +1 -1
  75. package/dist/{schema-BO1HCrxv.d.cts → schema-B7wpjw3I.d.mts} +26 -5
  76. package/dist/schema-B7wpjw3I.d.mts.map +1 -0
  77. package/dist/{schema-Dl018Aq4.cjs → schema-BM7g4xZ3.cjs} +46 -1
  78. package/dist/{schema-CmH1V_uI.d.mts → schema-BgOm_N0w.d.cts} +26 -5
  79. package/dist/schema-BgOm_N0w.d.cts.map +1 -0
  80. package/dist/{schema-DGmzxHja.mjs → schema-SrJmxZsC.mjs} +30 -3
  81. package/dist/schema-SrJmxZsC.mjs.map +1 -0
  82. package/dist/schema.cjs +4 -1
  83. package/dist/schema.d.cts +2 -2
  84. package/dist/schema.d.mts +3 -3
  85. package/dist/schema.mjs +2 -2
  86. package/dist/{storm-json-BD6WFbrI.cjs → storm-json-BDPXNC_u.cjs} +5 -5
  87. package/dist/{storm-json-nkhJgTz4.mjs → storm-json-BmO91crX.mjs} +6 -6
  88. package/dist/{storm-json-nkhJgTz4.mjs.map → storm-json-BmO91crX.mjs.map} +1 -1
  89. package/dist/{storm-json-8F9CKpXu.d.mts → storm-json-DJwb3Ou-.d.mts} +2 -2
  90. package/dist/{storm-json-8F9CKpXu.d.mts.map → storm-json-DJwb3Ou-.d.mts.map} +1 -1
  91. package/dist/{storm-json-DvIEWMEH.d.cts → storm-json-DiBg5b6r.d.cts} +2 -2
  92. package/dist/{storm-json-DvIEWMEH.d.cts.map → storm-json-DiBg5b6r.d.cts.map} +1 -1
  93. package/dist/storm-json.cjs +2 -2
  94. package/dist/storm-json.d.cts +1 -1
  95. package/dist/storm-json.d.mts +2 -2
  96. package/dist/storm-json.mjs +2 -2
  97. package/dist/{stringify-CYHjAvWm.mjs → stringify-CfeAVjh8.mjs} +3 -3
  98. package/dist/{stringify-CYHjAvWm.mjs.map → stringify-CfeAVjh8.mjs.map} +1 -1
  99. package/dist/{stringify-BehjrfhS.cjs → stringify-DQOBApRO.cjs} +2 -2
  100. package/dist/{stringify-Bc8OkhIr.d.cts → stringify-DtMcg2Wy.d.mts} +1 -1
  101. package/dist/stringify-DtMcg2Wy.d.mts.map +1 -0
  102. package/dist/{stringify-CFT1K1LE.d.mts → stringify-mAxwby9q.d.cts} +1 -1
  103. package/dist/stringify-mAxwby9q.d.cts.map +1 -0
  104. package/dist/{strip-comments-BA8MS_Fs.d.mts → strip-comments-AOXnoydB.d.cts} +1 -1
  105. package/dist/{strip-comments-BA8MS_Fs.d.mts.map → strip-comments-AOXnoydB.d.cts.map} +1 -1
  106. package/dist/{strip-comments-Cz_Wc25t.d.cts → strip-comments-BNN6Uf4e.d.mts} +1 -1
  107. package/dist/{strip-comments-Cz_Wc25t.d.cts.map → strip-comments-BNN6Uf4e.d.mts.map} +1 -1
  108. package/dist/{strip-comments-Dq00N_Sg.mjs → strip-comments-DNTu6CWM.mjs} +1 -1
  109. package/dist/{strip-comments-Dq00N_Sg.mjs.map → strip-comments-DNTu6CWM.mjs.map} +1 -1
  110. package/dist/{types-CPQlxauZ.d.mts → types-BAtAPir9.d.mts} +1 -1
  111. package/dist/{types-Bn8rC098.d.cts.map → types-BAtAPir9.d.mts.map} +1 -1
  112. package/dist/{types-Bn8rC098.d.cts → types-BzNIRhpI.d.cts} +1 -1
  113. package/dist/{types-CPQlxauZ.d.mts.map → types-BzNIRhpI.d.cts.map} +1 -1
  114. package/dist/types.d.cts +1 -1
  115. package/dist/types.d.mts +1 -1
  116. package/dist/utils/code-frames.cjs +1 -1
  117. package/dist/utils/code-frames.d.cts +1 -1
  118. package/dist/utils/code-frames.d.mts +1 -1
  119. package/dist/utils/code-frames.mjs +1 -1
  120. package/dist/utils/index.cjs +6 -6
  121. package/dist/utils/index.d.cts +5 -5
  122. package/dist/utils/index.d.mts +6 -6
  123. package/dist/utils/index.mjs +6 -6
  124. package/dist/utils/parse-error.cjs +1 -1
  125. package/dist/utils/parse-error.d.cts +1 -1
  126. package/dist/utils/parse-error.d.mts +1 -1
  127. package/dist/utils/parse-error.mjs +1 -1
  128. package/dist/utils/parse.cjs +1 -1
  129. package/dist/utils/parse.d.cts +1 -1
  130. package/dist/utils/parse.d.mts +1 -1
  131. package/dist/utils/parse.mjs +1 -1
  132. package/dist/utils/stringify.cjs +1 -1
  133. package/dist/utils/stringify.d.cts +1 -1
  134. package/dist/utils/stringify.d.mts +1 -1
  135. package/dist/utils/stringify.mjs +1 -1
  136. package/dist/utils/strip-comments.cjs +1 -1
  137. package/dist/utils/strip-comments.d.cts +1 -1
  138. package/dist/utils/strip-comments.d.mts +1 -1
  139. package/dist/utils/strip-comments.mjs +1 -1
  140. package/package.json +6 -2
  141. package/dist/parse-error-7K8s4vWf.d.cts.map +0 -1
  142. package/dist/parse-error-DpEv3vo_.d.mts.map +0 -1
  143. package/dist/schema-BO1HCrxv.d.cts.map +0 -1
  144. package/dist/schema-CmH1V_uI.d.mts.map +0 -1
  145. package/dist/schema-DGmzxHja.mjs.map +0 -1
  146. package/dist/stringify-Bc8OkhIr.d.cts.map +0 -1
  147. package/dist/stringify-CFT1K1LE.d.mts.map +0 -1
  148. /package/dist/{code-frames-BmUvlJ0w.cjs → code-frames-ChE4PPdh.cjs} +0 -0
  149. /package/dist/{index-B_e8BwCm.d.cts → index-CsuikFeJ.d.mts} +0 -0
  150. /package/dist/{index-CCt0lwyI.d.mts → index-Dh6J9gb5.d.cts} +0 -0
  151. /package/dist/{index-CDAfh8Ew.d.cts → index-VmEFGBxN.d.cts} +0 -0
  152. /package/dist/{index-DvuJXuAN.d.mts → index-e6k85DKM.d.mts} +0 -0
  153. /package/dist/{is-number-c5xguIbS.cjs → is-number-CV8PbAUX.cjs} +0 -0
  154. /package/dist/{is-string-C2RK4Gjs.cjs → is-string-yY-B30hL.cjs} +0 -0
  155. /package/dist/{is-undefined-CnI0qe-z.cjs → is-undefined-DyZkA263.cjs} +0 -0
  156. /package/dist/{pointer-B3W_Sme3.cjs → pointer-Cvmor4sN.cjs} +0 -0
  157. /package/dist/{pointer-Dn__XOdY.mjs → pointer-DScQSL_a.mjs} +0 -0
  158. /package/dist/{strip-comments-CmEG_smS.cjs → strip-comments-CPoO4Wj2.cjs} +0 -0
  159. /package/dist/{utils-jN2UkvqB.cjs → utils-DrK7G5cq.cjs} +0 -0
  160. /package/dist/{utils-mEkKIcgl.mjs → utils-mO6p60ai.mjs} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"is-set-object-C1Qnj1Q8.mjs","names":[],"sources":["../../type-checks/src/is-function.ts","../../type-checks/src/is-null.ts","../../type-checks/src/is-empty.ts","../../type-checks/src/is-set.ts","../../type-checks/src/is-non-null-object.ts","../../type-checks/src/is-set-object.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { AnyFunction } from \"@stryke/types/base\";\nimport { getObjectTag } from \"./get-object-tag\";\n\nexport function isSyncFunction(value?: any): value is AnyFunction {\n return getObjectTag(value) === \"[object Function]\";\n}\n\nexport function isAsyncFunction(value?: any): value is AnyFunction {\n return getObjectTag(value) === \"[object AsyncFunction]\";\n}\n\n/**\n * Check if the provided value's type is `Function`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Function`\n */\nexport const isFunction = (value: unknown): value is AnyFunction => {\n try {\n return (\n value instanceof Function ||\n typeof value === \"function\" ||\n Boolean(\n value?.constructor && (value as any)?.call && (value as any)?.apply\n ) ||\n isSyncFunction(value) ||\n isAsyncFunction(value)\n );\n } catch {\n return false;\n }\n};\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isNull = (value: unknown): value is null => {\n try {\n return value === null;\n } catch {\n return false;\n }\n};\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isDate } from \"./is-date\";\nimport { isFunction } from \"./is-function\";\nimport { isNull } from \"./is-null\";\nimport { isNumber } from \"./is-number\";\nimport { isSymbol } from \"./is-symbol\";\nimport { isUndefined } from \"./is-undefined\";\n\n/**\n * Check if the provided value's type is `null` or `undefined`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `null` or `undefined`\n */\nexport const isEmpty = (value: unknown) => {\n try {\n return isUndefined(value) || isNull(value);\n } catch {\n return false;\n }\n};\n\nexport const isEmptyAnything = (value: any) => {\n if (value === true || value === false) return true;\n if (value === null || value === undefined) return true;\n if (isNumber(value)) return value === 0;\n if (isDate(value)) return Number.isNaN(value.getTime());\n if (isFunction(value)) return false;\n if (isSymbol(value)) return false;\n const { length } = value;\n if (isNumber(length)) return length === 0;\n const { size } = value;\n if (isNumber(size)) return size === 0;\n const keys = Object.keys(value).length;\n\n return keys === 0;\n};\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isEmpty } from \"./is-empty\";\n\n/**\n * The inverse of the `isEmpty` function\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`\n */\nexport const isSet = (value: unknown): value is NonNullable<unknown> => {\n try {\n return !isEmpty(value);\n } catch {\n return false;\n }\n};\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isObject } from \"./is-object\";\nimport { isSet } from \"./is-set\";\n\n/**\n * Check if the provided value's type is `Object` and is not `null` or `undefined`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Object` and is not `null` or `undefined`\n */\nexport const isNonNullObject = (value: any): value is NonNullable<object> => {\n return isSet(value) && isObject(value);\n};\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isNonNullObject } from \"./is-non-null-object\";\n\n/**\n * Check if the provided value's type is an object with some fields set\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is an object with some fields se\n */\nexport const isSetObject = (value: unknown): value is NonNullable<object> => {\n try {\n return isNonNullObject(value) && Object.keys(value).length > 0;\n } catch {\n return false;\n }\n};\n"],"mappings":";;;;;AAqBA,SAAgB,eAAe,OAAmC;AAChE,QAAO,aAAa,MAAM,KAAK;;AAGjC,SAAgB,gBAAgB,OAAmC;AACjE,QAAO,aAAa,MAAM,KAAK;;;;;;;;AASjC,MAAa,cAAc,UAAyC;AAClE,KAAI;AACF,SACE,iBAAiB,YACjB,OAAO,UAAU,cACjB,QACE,OAAO,eAAgB,OAAe,QAAS,OAAe,MAC/D,IACD,eAAe,MAAM,IACrB,gBAAgB,MAAM;SAElB;AACN,SAAO;;;;;;AC7BX,MAAa,UAAU,UAAkC;AACvD,KAAI;AACF,SAAO,UAAU;SACX;AACN,SAAO;;;;;;;;;;;;ACSX,MAAa,WAAW,UAAmB;AACzC,KAAI;AACF,SAAO,YAAY,MAAM,IAAI,OAAO,MAAM;SACpC;AACN,SAAO;;;;;;;;;;;;ACTX,MAAa,SAAS,UAAkD;AACtE,KAAI;AACF,SAAO,CAAC,QAAQ,MAAM;SAChB;AACN,SAAO;;;;;;;;;;;;ACHX,MAAa,mBAAmB,UAA6C;AAC3E,QAAO,MAAM,MAAM,IAAI,SAAS,MAAM;;;;;;;;;;;ACFxC,MAAa,eAAe,UAAiD;AAC3E,KAAI;AACF,SAAO,gBAAgB,MAAM,IAAI,OAAO,KAAK,MAAM,CAAC,SAAS;SACvD;AACN,SAAO"}
1
+ {"version":3,"file":"is-set-object-yxjp5vg-.mjs","names":[],"sources":["../../type-checks/src/is-function.ts","../../type-checks/src/is-null.ts","../../type-checks/src/is-empty.ts","../../type-checks/src/is-set.ts","../../type-checks/src/is-non-null-object.ts","../../type-checks/src/is-set-object.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { AnyFunction } from \"@stryke/types/base\";\nimport { getObjectTag } from \"./get-object-tag\";\n\nexport function isSyncFunction(value?: any): value is AnyFunction {\n return getObjectTag(value) === \"[object Function]\";\n}\n\nexport function isAsyncFunction(value?: any): value is AnyFunction {\n return getObjectTag(value) === \"[object AsyncFunction]\";\n}\n\n/**\n * Check if the provided value's type is `Function`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Function`\n */\nexport const isFunction = (value: unknown): value is AnyFunction => {\n try {\n return (\n value instanceof Function ||\n typeof value === \"function\" ||\n Boolean(\n value?.constructor && (value as any)?.call && (value as any)?.apply\n ) ||\n isSyncFunction(value) ||\n isAsyncFunction(value)\n );\n } catch {\n return false;\n }\n};\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isNull = (value: unknown): value is null => {\n try {\n return value === null;\n } catch {\n return false;\n }\n};\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isDate } from \"./is-date\";\nimport { isFunction } from \"./is-function\";\nimport { isNull } from \"./is-null\";\nimport { isNumber } from \"./is-number\";\nimport { isSymbol } from \"./is-symbol\";\nimport { isUndefined } from \"./is-undefined\";\n\n/**\n * Check if the provided value's type is `null` or `undefined`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `null` or `undefined`\n */\nexport const isEmpty = (value: unknown) => {\n try {\n return isUndefined(value) || isNull(value);\n } catch {\n return false;\n }\n};\n\nexport const isEmptyAnything = (value: any) => {\n if (value === true || value === false) return true;\n if (value === null || value === undefined) return true;\n if (isNumber(value)) return value === 0;\n if (isDate(value)) return Number.isNaN(value.getTime());\n if (isFunction(value)) return false;\n if (isSymbol(value)) return false;\n const { length } = value;\n if (isNumber(length)) return length === 0;\n const { size } = value;\n if (isNumber(size)) return size === 0;\n const keys = Object.keys(value).length;\n\n return keys === 0;\n};\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isEmpty } from \"./is-empty\";\n\n/**\n * The inverse of the `isEmpty` function\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`\n */\nexport const isSet = (value: unknown): value is NonNullable<unknown> => {\n try {\n return !isEmpty(value);\n } catch {\n return false;\n }\n};\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isObject } from \"./is-object\";\nimport { isSet } from \"./is-set\";\n\n/**\n * Check if the provided value's type is `Object` and is not `null` or `undefined`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Object` and is not `null` or `undefined`\n */\nexport const isNonNullObject = (value: any): value is NonNullable<object> => {\n return isSet(value) && isObject(value);\n};\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isNonNullObject } from \"./is-non-null-object\";\n\n/**\n * Check if the provided value's type is an object with some fields set\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is an object with some fields se\n */\nexport const isSetObject = (value: unknown): value is NonNullable<object> => {\n try {\n return isNonNullObject(value) && Object.keys(value).length > 0;\n } catch {\n return false;\n }\n};\n"],"mappings":";;;;;AAqBA,SAAgB,eAAe,OAAmC;AAChE,QAAO,aAAa,MAAM,KAAK;;AAGjC,SAAgB,gBAAgB,OAAmC;AACjE,QAAO,aAAa,MAAM,KAAK;;;;;;;;AASjC,MAAa,cAAc,UAAyC;AAClE,KAAI;AACF,SACE,iBAAiB,YACjB,OAAO,UAAU,cACjB,QACE,OAAO,eAAgB,OAAe,QAAS,OAAe,MAC/D,IACD,eAAe,MAAM,IACrB,gBAAgB,MAAM;SAElB;AACN,SAAO;;;;;;AC7BX,MAAa,UAAU,UAAkC;AACvD,KAAI;AACF,SAAO,UAAU;SACX;AACN,SAAO;;;;;;;;;;;;ACSX,MAAa,WAAW,UAAmB;AACzC,KAAI;AACF,SAAO,YAAY,MAAM,IAAI,OAAO,MAAM;SACpC;AACN,SAAO;;;;;;;;;;;;ACTX,MAAa,SAAS,UAAkD;AACtE,KAAI;AACF,SAAO,CAAC,QAAQ,MAAM;SAChB;AACN,SAAO;;;;;;;;;;;;ACHX,MAAa,mBAAmB,UAA6C;AAC3E,QAAO,MAAM,MAAM,IAAI,SAAS,MAAM;;;;;;;;;;;ACFxC,MAAa,eAAe,UAAiD;AAC3E,KAAI;AACF,SAAO,gBAAgB,MAAM,IAAI,OAAO,KAAK,MAAM,CAAC,SAAS;SACvD;AACN,SAAO"}
@@ -9,4 +9,4 @@ const isString = (value) => {
9
9
 
10
10
  //#endregion
11
11
  export { isString as t };
12
- //# sourceMappingURL=is-string-CLiBUSKV.mjs.map
12
+ //# sourceMappingURL=is-string--ny35huw.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-string-CLiBUSKV.mjs","names":[],"sources":["../../type-checks/src/is-string.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isString = (value: unknown): value is string => {\n try {\n return typeof value === \"string\";\n } catch {\n return false;\n }\n};\n"],"mappings":";AAkBA,MAAa,YAAY,UAAoC;AAC3D,KAAI;AACF,SAAO,OAAO,UAAU;SAClB;AACN,SAAO"}
1
+ {"version":3,"file":"is-string--ny35huw.mjs","names":[],"sources":["../../type-checks/src/is-string.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isString = (value: unknown): value is string => {\n try {\n return typeof value === \"string\";\n } catch {\n return false;\n }\n};\n"],"mappings":";AAkBA,MAAa,YAAY,UAAoC;AAC3D,KAAI;AACF,SAAO,OAAO,UAAU;SAClB;AACN,SAAO"}
@@ -5,4 +5,4 @@ const isUndefined = (value) => {
5
5
 
6
6
  //#endregion
7
7
  export { isUndefined as t };
8
- //# sourceMappingURL=is-undefined-CmyJWYGD.mjs.map
8
+ //# sourceMappingURL=is-undefined-CqNzBssC.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-undefined-CmyJWYGD.mjs","names":[],"sources":["../../type-checks/src/is-undefined.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isUndefined = (value: unknown): value is undefined => {\n return value === undefined;\n};\n"],"mappings":";AAkBA,MAAa,eAAe,UAAuC;AACjE,QAAO,UAAU"}
1
+ {"version":3,"file":"is-undefined-CqNzBssC.mjs","names":[],"sources":["../../type-checks/src/is-undefined.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isUndefined = (value: unknown): value is undefined => {\n return value === undefined;\n};\n"],"mappings":";AAkBA,MAAa,eAAe,UAAuC;AACjE,QAAO,UAAU"}
@@ -1,5 +1,5 @@
1
- import { t as isNumber } from "./is-number-BIwzZzyi.mjs";
2
- import { t as isString } from "./is-string-CLiBUSKV.mjs";
1
+ import { t as isNumber } from "./is-number-BMxmACAS.mjs";
2
+ import { t as isString } from "./is-string--ny35huw.mjs";
3
3
 
4
4
  //#region src/pointer/parse.ts
5
5
  const TILDE_ONE = /~1/g;
@@ -78,4 +78,4 @@ const isInteger = (str) => {
78
78
 
79
79
  //#endregion
80
80
  export { isValidIndex as a, unescapePointerSegment as c, isRoot as i, formatJsonPointer as n, parent as o, isInteger as r, parseJsonPointer as s, escapePointerSegment as t };
81
- //# sourceMappingURL=parse-vw_qRD3F.mjs.map
81
+ //# sourceMappingURL=parse-B3NfTO06.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse-vw_qRD3F.mjs","names":["charCode: any"],"sources":["../src/pointer/parse.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isNumber } from \"@stryke/type-checks/is-number\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport type { JsonPointerPath } from \"@stryke/types/json\";\n\nconst TILDE_ONE = /~1/g;\nconst TILDE_ZERO = /~0/g;\nconst TILDE = /~/g;\nconst FORWARD_SLASH = /\\//g;\n\n/**\n * Escapes a JSON pointer path segment.\n *\n * @param segment - JSON pointer path segment.\n * @returns Escaped JSON pointer path segment.\n */\nexport function escapePointerSegment(segment: string): string {\n if (!segment.includes(\"/\") && !segment.includes(\"~\")) {\n return segment;\n }\n\n return segment.replace(TILDE, \"~0\").replace(FORWARD_SLASH, \"~1\");\n}\n\n/**\n * Unescapes a JSON pointer path segment.\n *\n * @param segment - JSON pointer path segment.\n * @returns Unescaped JSON pointer path segment.\n */\nexport function unescapePointerSegment(segment: string): string {\n if (!segment.includes(\"~\")) {\n return segment;\n }\n\n return segment.replace(TILDE_ONE, \"/\").replace(TILDE_ZERO, \"~\");\n}\n\n/**\n * Convert JSON pointer like \"/foo/bar\" to array like [\"\", \"foo\", \"bar\"], while\n * also un-escaping reserved characters.\n */\nexport function parseJsonPointer(pointer: string): JsonPointerPath {\n if (!pointer) return [];\n // TODO: Performance of this line can be improved: (1) don't use .split(); (2) don't use .map().\n return pointer\n .slice(1)\n .split(\"/\")\n .map(segment => unescapePointerSegment(segment));\n}\n\n/**\n * Escape and format a path array like [\"\", \"foo\", \"bar\"] to JSON pointer\n * like \"/foo/bar\".\n */\nexport function formatJsonPointer(path: JsonPointerPath): string {\n // eslint-disable-next-line ts/no-use-before-define\n if (isRoot(path)) {\n return \"\";\n }\n\n return `/${path.map(segment => escapePointerSegment(String(segment))).join(\"/\")}`;\n}\n\n/**\n * Returns true if JSON Pointer points to root value, false otherwise.\n */\nexport const isRoot = (path: string | number | JsonPointerPath): boolean =>\n isString(path)\n ? path === \"\"\n : isNumber(path)\n ? path === 0\n : Array.isArray(path) && path.length === 0;\n\n/**\n * Returns parent path, e.g. for ['foo', 'bar', 'baz'] returns ['foo', 'bar'].\n */\nexport function parent(path: JsonPointerPath): JsonPointerPath {\n if (path.length === 0) {\n throw new Error(\"NO_PARENT\");\n }\n\n return path.slice(0, -1);\n}\n\n/**\n * Check if path component can be a valid array index.\n */\nexport function isValidIndex(index: string | number): boolean {\n if (isNumber(index)) {\n return true;\n }\n\n const n = Number.parseInt(index, 10);\n\n return String(n) === index && n >= 0;\n}\n\nexport const isInteger = (str: string): boolean => {\n const len = str.length;\n let i = 0;\n let charCode: any;\n while (i < len) {\n charCode = str.codePointAt(i);\n if (charCode >= 48 && charCode <= 57) {\n i++;\n continue;\n }\n return false;\n }\n return true;\n};\n"],"mappings":";;;;AAsBA,MAAM,YAAY;AAClB,MAAM,aAAa;AACnB,MAAM,QAAQ;AACd,MAAM,gBAAgB;;;;;;;AAQtB,SAAgB,qBAAqB,SAAyB;AAC5D,KAAI,CAAC,QAAQ,SAAS,IAAI,IAAI,CAAC,QAAQ,SAAS,IAAI,CAClD,QAAO;AAGT,QAAO,QAAQ,QAAQ,OAAO,KAAK,CAAC,QAAQ,eAAe,KAAK;;;;;;;;AASlE,SAAgB,uBAAuB,SAAyB;AAC9D,KAAI,CAAC,QAAQ,SAAS,IAAI,CACxB,QAAO;AAGT,QAAO,QAAQ,QAAQ,WAAW,IAAI,CAAC,QAAQ,YAAY,IAAI;;;;;;AAOjE,SAAgB,iBAAiB,SAAkC;AACjE,KAAI,CAAC,QAAS,QAAO,EAAE;AAEvB,QAAO,QACJ,MAAM,EAAE,CACR,MAAM,IAAI,CACV,KAAI,YAAW,uBAAuB,QAAQ,CAAC;;;;;;AAOpD,SAAgB,kBAAkB,MAA+B;AAE/D,KAAI,OAAO,KAAK,CACd,QAAO;AAGT,QAAO,IAAI,KAAK,KAAI,YAAW,qBAAqB,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI;;;;;AAMjF,MAAa,UAAU,SACrB,SAAS,KAAK,GACV,SAAS,KACT,SAAS,KAAK,GACZ,SAAS,IACT,MAAM,QAAQ,KAAK,IAAI,KAAK,WAAW;;;;AAK/C,SAAgB,OAAO,MAAwC;AAC7D,KAAI,KAAK,WAAW,EAClB,OAAM,IAAI,MAAM,YAAY;AAG9B,QAAO,KAAK,MAAM,GAAG,GAAG;;;;;AAM1B,SAAgB,aAAa,OAAiC;AAC5D,KAAI,SAAS,MAAM,CACjB,QAAO;CAGT,MAAM,IAAI,OAAO,SAAS,OAAO,GAAG;AAEpC,QAAO,OAAO,EAAE,KAAK,SAAS,KAAK;;AAGrC,MAAa,aAAa,QAAyB;CACjD,MAAM,MAAM,IAAI;CAChB,IAAI,IAAI;CACR,IAAIA;AACJ,QAAO,IAAI,KAAK;AACd,aAAW,IAAI,YAAY,EAAE;AAC7B,MAAI,YAAY,MAAM,YAAY,IAAI;AACpC;AACA;;AAEF,SAAO;;AAET,QAAO"}
1
+ {"version":3,"file":"parse-B3NfTO06.mjs","names":["charCode: any"],"sources":["../src/pointer/parse.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isNumber } from \"@stryke/type-checks/is-number\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport type { JsonPointerPath } from \"@stryke/types/json\";\n\nconst TILDE_ONE = /~1/g;\nconst TILDE_ZERO = /~0/g;\nconst TILDE = /~/g;\nconst FORWARD_SLASH = /\\//g;\n\n/**\n * Escapes a JSON pointer path segment.\n *\n * @param segment - JSON pointer path segment.\n * @returns Escaped JSON pointer path segment.\n */\nexport function escapePointerSegment(segment: string): string {\n if (!segment.includes(\"/\") && !segment.includes(\"~\")) {\n return segment;\n }\n\n return segment.replace(TILDE, \"~0\").replace(FORWARD_SLASH, \"~1\");\n}\n\n/**\n * Unescapes a JSON pointer path segment.\n *\n * @param segment - JSON pointer path segment.\n * @returns Unescaped JSON pointer path segment.\n */\nexport function unescapePointerSegment(segment: string): string {\n if (!segment.includes(\"~\")) {\n return segment;\n }\n\n return segment.replace(TILDE_ONE, \"/\").replace(TILDE_ZERO, \"~\");\n}\n\n/**\n * Convert JSON pointer like \"/foo/bar\" to array like [\"\", \"foo\", \"bar\"], while\n * also un-escaping reserved characters.\n */\nexport function parseJsonPointer(pointer: string): JsonPointerPath {\n if (!pointer) return [];\n // TODO: Performance of this line can be improved: (1) don't use .split(); (2) don't use .map().\n return pointer\n .slice(1)\n .split(\"/\")\n .map(segment => unescapePointerSegment(segment));\n}\n\n/**\n * Escape and format a path array like [\"\", \"foo\", \"bar\"] to JSON pointer\n * like \"/foo/bar\".\n */\nexport function formatJsonPointer(path: JsonPointerPath): string {\n // eslint-disable-next-line ts/no-use-before-define\n if (isRoot(path)) {\n return \"\";\n }\n\n return `/${path.map(segment => escapePointerSegment(String(segment))).join(\"/\")}`;\n}\n\n/**\n * Returns true if JSON Pointer points to root value, false otherwise.\n */\nexport const isRoot = (path: string | number | JsonPointerPath): boolean =>\n isString(path)\n ? path === \"\"\n : isNumber(path)\n ? path === 0\n : Array.isArray(path) && path.length === 0;\n\n/**\n * Returns parent path, e.g. for ['foo', 'bar', 'baz'] returns ['foo', 'bar'].\n */\nexport function parent(path: JsonPointerPath): JsonPointerPath {\n if (path.length === 0) {\n throw new Error(\"NO_PARENT\");\n }\n\n return path.slice(0, -1);\n}\n\n/**\n * Check if path component can be a valid array index.\n */\nexport function isValidIndex(index: string | number): boolean {\n if (isNumber(index)) {\n return true;\n }\n\n const n = Number.parseInt(index, 10);\n\n return String(n) === index && n >= 0;\n}\n\nexport const isInteger = (str: string): boolean => {\n const len = str.length;\n let i = 0;\n let charCode: any;\n while (i < len) {\n charCode = str.codePointAt(i);\n if (charCode >= 48 && charCode <= 57) {\n i++;\n continue;\n }\n return false;\n }\n return true;\n};\n"],"mappings":";;;;AAsBA,MAAM,YAAY;AAClB,MAAM,aAAa;AACnB,MAAM,QAAQ;AACd,MAAM,gBAAgB;;;;;;;AAQtB,SAAgB,qBAAqB,SAAyB;AAC5D,KAAI,CAAC,QAAQ,SAAS,IAAI,IAAI,CAAC,QAAQ,SAAS,IAAI,CAClD,QAAO;AAGT,QAAO,QAAQ,QAAQ,OAAO,KAAK,CAAC,QAAQ,eAAe,KAAK;;;;;;;;AASlE,SAAgB,uBAAuB,SAAyB;AAC9D,KAAI,CAAC,QAAQ,SAAS,IAAI,CACxB,QAAO;AAGT,QAAO,QAAQ,QAAQ,WAAW,IAAI,CAAC,QAAQ,YAAY,IAAI;;;;;;AAOjE,SAAgB,iBAAiB,SAAkC;AACjE,KAAI,CAAC,QAAS,QAAO,EAAE;AAEvB,QAAO,QACJ,MAAM,EAAE,CACR,MAAM,IAAI,CACV,KAAI,YAAW,uBAAuB,QAAQ,CAAC;;;;;;AAOpD,SAAgB,kBAAkB,MAA+B;AAE/D,KAAI,OAAO,KAAK,CACd,QAAO;AAGT,QAAO,IAAI,KAAK,KAAI,YAAW,qBAAqB,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI;;;;;AAMjF,MAAa,UAAU,SACrB,SAAS,KAAK,GACV,SAAS,KACT,SAAS,KAAK,GACZ,SAAS,IACT,MAAM,QAAQ,KAAK,IAAI,KAAK,WAAW;;;;AAK/C,SAAgB,OAAO,MAAwC;AAC7D,KAAI,KAAK,WAAW,EAClB,OAAM,IAAI,MAAM,YAAY;AAG9B,QAAO,KAAK,MAAM,GAAG,GAAG;;;;;AAM1B,SAAgB,aAAa,OAAiC;AAC5D,KAAI,SAAS,MAAM,CACjB,QAAO;CAGT,MAAM,IAAI,OAAO,SAAS,OAAO,GAAG;AAEpC,QAAO,OAAO,EAAE,KAAK,SAAS,KAAK;;AAGrC,MAAa,aAAa,QAAyB;CACjD,MAAM,MAAM,IAAI;CAChB,IAAI,IAAI;CACR,IAAIA;AACJ,QAAO,IAAI,KAAK;AACd,aAAW,IAAI,YAAY,EAAE;AAC7B,MAAI,YAAY,MAAM,YAAY,IAAI;AACpC;AACA;;AAEF,SAAO;;AAET,QAAO"}
@@ -1,5 +1,5 @@
1
- const require_is_number = require('./is-number-c5xguIbS.cjs');
2
- const require_is_string = require('./is-string-C2RK4Gjs.cjs');
1
+ const require_is_number = require('./is-number-CV8PbAUX.cjs');
2
+ const require_is_string = require('./is-string-yY-B30hL.cjs');
3
3
 
4
4
  //#region src/pointer/parse.ts
5
5
  const TILDE_ONE = /~1/g;
@@ -1,4 +1,4 @@
1
- import { t as stripComments } from "./strip-comments-Dq00N_Sg.mjs";
1
+ import { t as stripComments } from "./strip-comments-DNTu6CWM.mjs";
2
2
 
3
3
  //#region src/utils/parse.ts
4
4
  const suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
@@ -49,4 +49,4 @@ function safeParse(value, options = {}) {
49
49
 
50
50
  //#endregion
51
51
  export { safeParse as n, parse as t };
52
- //# sourceMappingURL=parse-Dn43ZK9y.mjs.map
52
+ //# sourceMappingURL=parse-BrChHTWb.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse-Dn43ZK9y.mjs","names":[],"sources":["../src/utils/parse.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { stripComments } from \"./strip-comments\";\n\n// https://github.com/fastify/secure-json-parse\n// https://github.com/hapijs/bourne\nconst suspectProtoRx =\n /\"(?:_|\\\\u0{2}5[Ff]){2}(?:p|\\\\u0{2}70)(?:r|\\\\u0{2}72)(?:o|\\\\u0{2}6[Ff])(?:t|\\\\u0{2}74)(?:o|\\\\u0{2}6[Ff])(?:_|\\\\u0{2}5[Ff]){2}\"\\s*:/;\nconst suspectConstructorRx =\n /\"(?:c|\\\\u0063)(?:o|\\\\u006[Ff])(?:n|\\\\u006[Ee])(?:s|\\\\u0073)(?:t|\\\\u0074)(?:r|\\\\u0072)(?:u|\\\\u0075)(?:c|\\\\u0063)(?:t|\\\\u0074)(?:o|\\\\u006[Ff])(?:r|\\\\u0072)\"\\s*:/;\n\nconst JsonSigRx = /^\\s*[\"[{]|^\\s*-?\\d{1,16}(?:\\.\\d{1,17})?(?:E[+-]?\\d+)?\\s*$/i;\n\nfunction jsonParseTransform(key: string, value: any): any {\n if (\n key === \"__proto__\" ||\n (key === \"constructor\" &&\n value &&\n typeof value === \"object\" &&\n \"prototype\" in value)\n ) {\n // eslint-disable-next-line no-console\n console.warn(`Dropping \"${key}\" key to prevent prototype pollution.`);\n return;\n }\n return value;\n}\n\nexport interface Options {\n strict?: boolean;\n}\n\nexport function parse<T = unknown>(value: any, options: Options = {}): T {\n if (typeof value !== \"string\") {\n return value;\n }\n\n let stripped = stripComments(value);\n\n if (\n stripped[0] === '\"' &&\n stripped[stripped.length - 1] === '\"' &&\n !stripped.includes(\"\\\\\")\n ) {\n return stripped.slice(1, -1) as T;\n }\n\n stripped = stripped.trim();\n\n if (stripped.length <= 9) {\n switch (stripped.toLowerCase()) {\n case \"true\": {\n return true as T;\n }\n case \"false\": {\n return false as T;\n }\n case \"undefined\": {\n return undefined as T;\n }\n case \"null\": {\n return null as T;\n }\n case \"nan\": {\n return Number.NaN as T;\n }\n case \"infinity\": {\n return Number.POSITIVE_INFINITY as T;\n }\n case \"-infinity\": {\n return Number.NEGATIVE_INFINITY as T;\n }\n }\n }\n\n if (!JsonSigRx.test(stripped)) {\n if (options.strict) {\n throw new Error(\"Invalid JSON\");\n }\n return stripped as T;\n }\n\n try {\n if (suspectProtoRx.test(stripped) || suspectConstructorRx.test(stripped)) {\n if (options.strict) {\n throw new Error(\"Possible prototype pollution\");\n }\n return JSON.parse(stripped, jsonParseTransform);\n }\n\n return JSON.parse(stripped);\n } catch (error) {\n if (options.strict) {\n throw error;\n }\n return value as T;\n }\n}\n\nexport function safeParse<T = unknown>(value: any, options: Options = {}): T {\n return parse<T>(value, { ...options, strict: true });\n}\n"],"mappings":";;;AAsBA,MAAM,iBACJ;AACF,MAAM,uBACJ;AAEF,MAAM,YAAY;AAElB,SAAS,mBAAmB,KAAa,OAAiB;AACxD,KACE,QAAQ,eACP,QAAQ,iBACP,SACA,OAAO,UAAU,YACjB,eAAe,OACjB;AAEA,UAAQ,KAAK,aAAa,IAAI,uCAAuC;AACrE;;AAEF,QAAO;;AAOT,SAAgB,MAAmB,OAAY,UAAmB,EAAE,EAAK;AACvE,KAAI,OAAO,UAAU,SACnB,QAAO;CAGT,IAAI,WAAW,cAAc,MAAM;AAEnC,KACE,SAAS,OAAO,QAChB,SAAS,SAAS,SAAS,OAAO,QAClC,CAAC,SAAS,SAAS,KAAK,CAExB,QAAO,SAAS,MAAM,GAAG,GAAG;AAG9B,YAAW,SAAS,MAAM;AAE1B,KAAI,SAAS,UAAU,EACrB,SAAQ,SAAS,aAAa,EAA9B;EACE,KAAK,OACH,QAAO;EAET,KAAK,QACH,QAAO;EAET,KAAK,YACH;EAEF,KAAK,OACH,QAAO;EAET,KAAK,MACH,QAAO;EAET,KAAK,WACH,QAAO,OAAO;EAEhB,KAAK,YACH,QAAO,OAAO;;AAKpB,KAAI,CAAC,UAAU,KAAK,SAAS,EAAE;AAC7B,MAAI,QAAQ,OACV,OAAM,IAAI,MAAM,eAAe;AAEjC,SAAO;;AAGT,KAAI;AACF,MAAI,eAAe,KAAK,SAAS,IAAI,qBAAqB,KAAK,SAAS,EAAE;AACxE,OAAI,QAAQ,OACV,OAAM,IAAI,MAAM,+BAA+B;AAEjD,UAAO,KAAK,MAAM,UAAU,mBAAmB;;AAGjD,SAAO,KAAK,MAAM,SAAS;UACpB,OAAO;AACd,MAAI,QAAQ,OACV,OAAM;AAER,SAAO;;;AAIX,SAAgB,UAAuB,OAAY,UAAmB,EAAE,EAAK;AAC3E,QAAO,MAAS,OAAO;EAAE,GAAG;EAAS,QAAQ;EAAM,CAAC"}
1
+ {"version":3,"file":"parse-BrChHTWb.mjs","names":[],"sources":["../src/utils/parse.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { stripComments } from \"./strip-comments\";\n\n// https://github.com/fastify/secure-json-parse\n// https://github.com/hapijs/bourne\nconst suspectProtoRx =\n /\"(?:_|\\\\u0{2}5[Ff]){2}(?:p|\\\\u0{2}70)(?:r|\\\\u0{2}72)(?:o|\\\\u0{2}6[Ff])(?:t|\\\\u0{2}74)(?:o|\\\\u0{2}6[Ff])(?:_|\\\\u0{2}5[Ff]){2}\"\\s*:/;\nconst suspectConstructorRx =\n /\"(?:c|\\\\u0063)(?:o|\\\\u006[Ff])(?:n|\\\\u006[Ee])(?:s|\\\\u0073)(?:t|\\\\u0074)(?:r|\\\\u0072)(?:u|\\\\u0075)(?:c|\\\\u0063)(?:t|\\\\u0074)(?:o|\\\\u006[Ff])(?:r|\\\\u0072)\"\\s*:/;\n\nconst JsonSigRx = /^\\s*[\"[{]|^\\s*-?\\d{1,16}(?:\\.\\d{1,17})?(?:E[+-]?\\d+)?\\s*$/i;\n\nfunction jsonParseTransform(key: string, value: any): any {\n if (\n key === \"__proto__\" ||\n (key === \"constructor\" &&\n value &&\n typeof value === \"object\" &&\n \"prototype\" in value)\n ) {\n // eslint-disable-next-line no-console\n console.warn(`Dropping \"${key}\" key to prevent prototype pollution.`);\n return;\n }\n return value;\n}\n\nexport interface Options {\n strict?: boolean;\n}\n\nexport function parse<T = unknown>(value: any, options: Options = {}): T {\n if (typeof value !== \"string\") {\n return value;\n }\n\n let stripped = stripComments(value);\n\n if (\n stripped[0] === '\"' &&\n stripped[stripped.length - 1] === '\"' &&\n !stripped.includes(\"\\\\\")\n ) {\n return stripped.slice(1, -1) as T;\n }\n\n stripped = stripped.trim();\n\n if (stripped.length <= 9) {\n switch (stripped.toLowerCase()) {\n case \"true\": {\n return true as T;\n }\n case \"false\": {\n return false as T;\n }\n case \"undefined\": {\n return undefined as T;\n }\n case \"null\": {\n return null as T;\n }\n case \"nan\": {\n return Number.NaN as T;\n }\n case \"infinity\": {\n return Number.POSITIVE_INFINITY as T;\n }\n case \"-infinity\": {\n return Number.NEGATIVE_INFINITY as T;\n }\n }\n }\n\n if (!JsonSigRx.test(stripped)) {\n if (options.strict) {\n throw new Error(\"Invalid JSON\");\n }\n return stripped as T;\n }\n\n try {\n if (suspectProtoRx.test(stripped) || suspectConstructorRx.test(stripped)) {\n if (options.strict) {\n throw new Error(\"Possible prototype pollution\");\n }\n return JSON.parse(stripped, jsonParseTransform);\n }\n\n return JSON.parse(stripped);\n } catch (error) {\n if (options.strict) {\n throw error;\n }\n return value as T;\n }\n}\n\nexport function safeParse<T = unknown>(value: any, options: Options = {}): T {\n return parse<T>(value, { ...options, strict: true });\n}\n"],"mappings":";;;AAsBA,MAAM,iBACJ;AACF,MAAM,uBACJ;AAEF,MAAM,YAAY;AAElB,SAAS,mBAAmB,KAAa,OAAiB;AACxD,KACE,QAAQ,eACP,QAAQ,iBACP,SACA,OAAO,UAAU,YACjB,eAAe,OACjB;AAEA,UAAQ,KAAK,aAAa,IAAI,uCAAuC;AACrE;;AAEF,QAAO;;AAOT,SAAgB,MAAmB,OAAY,UAAmB,EAAE,EAAK;AACvE,KAAI,OAAO,UAAU,SACnB,QAAO;CAGT,IAAI,WAAW,cAAc,MAAM;AAEnC,KACE,SAAS,OAAO,QAChB,SAAS,SAAS,SAAS,OAAO,QAClC,CAAC,SAAS,SAAS,KAAK,CAExB,QAAO,SAAS,MAAM,GAAG,GAAG;AAG9B,YAAW,SAAS,MAAM;AAE1B,KAAI,SAAS,UAAU,EACrB,SAAQ,SAAS,aAAa,EAA9B;EACE,KAAK,OACH,QAAO;EAET,KAAK,QACH,QAAO;EAET,KAAK,YACH;EAEF,KAAK,OACH,QAAO;EAET,KAAK,MACH,QAAO;EAET,KAAK,WACH,QAAO,OAAO;EAEhB,KAAK,YACH,QAAO,OAAO;;AAKpB,KAAI,CAAC,UAAU,KAAK,SAAS,EAAE;AAC7B,MAAI,QAAQ,OACV,OAAM,IAAI,MAAM,eAAe;AAEjC,SAAO;;AAGT,KAAI;AACF,MAAI,eAAe,KAAK,SAAS,IAAI,qBAAqB,KAAK,SAAS,EAAE;AACxE,OAAI,QAAQ,OACV,OAAM,IAAI,MAAM,+BAA+B;AAEjD,UAAO,KAAK,MAAM,UAAU,mBAAmB;;AAGjD,SAAO,KAAK,MAAM,SAAS;UACpB,OAAO;AACd,MAAI,QAAQ,OACV,OAAM;AAER,SAAO;;;AAIX,SAAgB,UAAuB,OAAY,UAAmB,EAAE,EAAK;AAC3E,QAAO,MAAS,OAAO;EAAE,GAAG;EAAS,QAAQ;EAAM,CAAC"}
@@ -1,4 +1,4 @@
1
- const require_strip_comments = require('./strip-comments-CmEG_smS.cjs');
1
+ const require_strip_comments = require('./strip-comments-CPoO4Wj2.cjs');
2
2
 
3
3
  //#region src/utils/parse.ts
4
4
  const suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
@@ -48,4 +48,4 @@ declare function isValidIndex(index: string | number): boolean;
48
48
  declare const isInteger: (str: string) => boolean;
49
49
  //#endregion
50
50
  export { isValidIndex as a, unescapePointerSegment as c, isRoot as i, formatJsonPointer as n, parent as o, isInteger as r, parseJsonPointer as s, escapePointerSegment as t };
51
- //# sourceMappingURL=parse-DZfi3d96.d.cts.map
51
+ //# sourceMappingURL=parse-DCHSu_0u.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse-Cj-YfhrI.d.mts","names":[],"sources":["../../types/src/json.ts","../src/pointer/parse.ts"],"sourcesContent":[],"mappings":";;;;;;;;KA6CY,eAAA;;;AAAZ;;;;ACZA;AAcA;AAYgB,iBA1BA,oBAAA,CA0BmC,OAAe,EAAA,MAAA,CAAA,EAAA,MAAA;AAalE;AAYA;AAUA;AAWA;AAUA;;iBApEgB,sBAAA;;;;;iBAYA,gBAAA,mBAAmC;;;;;iBAanC,iBAAA,OAAwB;;;;cAY3B,iCAAkC;;;;iBAU/B,MAAA,OAAa,kBAAkB;;;;iBAW/B,YAAA;cAUH"}
1
+ {"version":3,"file":"parse-DCHSu_0u.d.cts","names":[],"sources":["../../types/src/json.ts","../src/pointer/parse.ts"],"sourcesContent":[],"mappings":";;;;;;;;KA6CY,eAAA;;;AAAZ;;;;ACZA;AAcA;AAYgB,iBA1BA,oBAAA,CA0BmC,OAAe,EAAA,MAAA,CAAA,EAAA,MAAA;AAalE;AAYA;AAUA;AAWA;AAUA;;iBApEgB,sBAAA;;;;;iBAYA,gBAAA,mBAAmC;;;;;iBAanC,iBAAA,OAAwB;;;;cAY3B,iCAAkC;;;;iBAU/B,MAAA,OAAa,kBAAkB;;;;iBAW/B,YAAA;cAUH"}
@@ -48,4 +48,4 @@ declare function isValidIndex(index: string | number): boolean;
48
48
  declare const isInteger: (str: string) => boolean;
49
49
  //#endregion
50
50
  export { isValidIndex as a, unescapePointerSegment as c, isRoot as i, formatJsonPointer as n, parent as o, isInteger as r, parseJsonPointer as s, escapePointerSegment as t };
51
- //# sourceMappingURL=parse-Cj-YfhrI.d.mts.map
51
+ //# sourceMappingURL=parse-DaiwKCLz.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse-DZfi3d96.d.cts","names":[],"sources":["../../types/src/json.ts","../src/pointer/parse.ts"],"sourcesContent":[],"mappings":";;;;;;;;KA6CY,eAAA;;;AAAZ;;;;ACZA;AAcA;AAYgB,iBA1BA,oBAAA,CA0BmC,OAAe,EAAA,MAAA,CAAA,EAAA,MAAA;AAalE;AAYA;AAUA;AAWA;AAUA;;iBApEgB,sBAAA;;;;;iBAYA,gBAAA,mBAAmC;;;;;iBAanC,iBAAA,OAAwB;;;;cAY3B,iCAAkC;;;;iBAU/B,MAAA,OAAa,kBAAkB;;;;iBAW/B,YAAA;cAUH"}
1
+ {"version":3,"file":"parse-DaiwKCLz.d.mts","names":[],"sources":["../../types/src/json.ts","../src/pointer/parse.ts"],"sourcesContent":[],"mappings":";;;;;;;;KA6CY,eAAA;;;AAAZ;;;;ACZA;AAcA;AAYgB,iBA1BA,oBAAA,CA0BmC,OAAe,EAAA,MAAA,CAAA,EAAA,MAAA;AAalE;AAYA;AAUA;AAWA;AAUA;;iBApEgB,sBAAA;;;;;iBAYA,gBAAA,mBAAmC;;;;;iBAanC,iBAAA,OAAwB;;;;cAY3B,iCAAkC;;;;iBAU/B,MAAA,OAAa,kBAAkB;;;;iBAW/B,YAAA;cAUH"}
@@ -6,4 +6,4 @@ declare function parse<T = unknown>(value: any, options?: Options): T;
6
6
  declare function safeParse<T = unknown>(value: any, options?: Options): T;
7
7
  //#endregion
8
8
  export { parse as n, safeParse as r, Options as t };
9
- //# sourceMappingURL=parse-BGlhbY16.d.cts.map
9
+ //# sourceMappingURL=parse-XXQfTfNE.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse-BGlhbY16.d.cts","names":[],"sources":["../src/utils/parse.ts"],"sourcesContent":[],"mappings":";UA4CiB,OAAA;EAAA,MAAA,CAAA,EAAA,OAAO;AAIxB;AAmEgB,iBAnEA,KAmE4C,CAAA,IAAA,OAAgB,CAAA,CAAA,KAAA,EAAA,GAAA,EAAA,OAAA,CAAA,EAnEpB,OAmEoB,CAAA,EAnEL,CAmEK;iBAA5D,6CAA4C,UAAe"}
1
+ {"version":3,"file":"parse-XXQfTfNE.d.mts","names":[],"sources":["../src/utils/parse.ts"],"sourcesContent":[],"mappings":";UA4CiB,OAAA;EAAA,MAAA,CAAA,EAAA,OAAO;AAIxB;AAmEgB,iBAnEA,KAmE4C,CAAA,IAAA,OAAgB,CAAA,CAAA,KAAA,EAAA,GAAA,EAAA,OAAA,CAAA,EAnEpB,OAmEoB,CAAA,EAnEL,CAmEK;iBAA5D,6CAA4C,UAAe"}
@@ -12,4 +12,4 @@ import { ParseError } from "jsonc-parser";
12
12
  declare function formatParseError(input: string, parseError: ParseError): string;
13
13
  //#endregion
14
14
  export { formatParseError as t };
15
- //# sourceMappingURL=parse-error-DpEv3vo_.d.mts.map
15
+ //# sourceMappingURL=parse-error-CDt01Gvc.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-error-CDt01Gvc.d.mts","names":[],"sources":["../src/utils/parse-error.ts"],"sourcesContent":[],"mappings":";;;;;;AA8BA;;;;;iBAAgB,gBAAA,4BAA4C"}
@@ -12,4 +12,4 @@ import { ParseError } from "jsonc-parser";
12
12
  declare function formatParseError(input: string, parseError: ParseError): string;
13
13
  //#endregion
14
14
  export { formatParseError as t };
15
- //# sourceMappingURL=parse-error-7K8s4vWf.d.cts.map
15
+ //# sourceMappingURL=parse-error-CGKcBkMJ.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-error-CGKcBkMJ.d.cts","names":[],"sources":["../src/utils/parse-error.ts"],"sourcesContent":[],"mappings":";;;;;;AA8BA;;;;;iBAAgB,gBAAA,4BAA4C"}
@@ -1,5 +1,5 @@
1
- const require_storm_json = require('./storm-json-BD6WFbrI.cjs');
2
- const require_code_frames = require('./code-frames-BmUvlJ0w.cjs');
1
+ const require_storm_json = require('./storm-json-BDPXNC_u.cjs');
2
+ const require_code_frames = require('./code-frames-ChE4PPdh.cjs');
3
3
  let jsonc_parser = require("jsonc-parser");
4
4
  let lines_and_columns = require("lines-and-columns");
5
5
 
@@ -1,4 +1,4 @@
1
- import { t as codeFrameColumns } from "./code-frames-DuBfTMu4.mjs";
1
+ import { t as codeFrameColumns } from "./code-frames-C8DEdLmV.mjs";
2
2
  import { printParseErrorCode } from "jsonc-parser";
3
3
  import { LinesAndColumns } from "lines-and-columns";
4
4
 
@@ -31,4 +31,4 @@ function formatParseError(input, parseError) {
31
31
 
32
32
  //#endregion
33
33
  export { formatParseError as t };
34
- //# sourceMappingURL=parse-error-Af4zHUQ_.mjs.map
34
+ //# sourceMappingURL=parse-error-Cu6mjBS7.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse-error-Af4zHUQ_.mjs","names":[],"sources":["../src/utils/parse-error.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ParseError } from \"jsonc-parser\";\nimport { printParseErrorCode } from \"jsonc-parser\";\nimport { LinesAndColumns } from \"lines-and-columns\";\nimport { codeFrameColumns } from \"./code-frames\";\n\n/**\n * Nicely formats a JSON error with context\n *\n * @param input - JSON content as string\n * @param parseError - jsonc ParseError\n * @returns Formatted error message with context\n */\nexport function formatParseError(input: string, parseError: ParseError) {\n const { error, offset, length } = parseError;\n const result = new LinesAndColumns(input).locationForIndex(offset);\n let line = result?.line ?? 0;\n let column = result?.column ?? 0;\n\n line++;\n column++;\n\n return `${printParseErrorCode(error)} in JSON at ${line}:${column}\\n${codeFrameColumns(\n input,\n {\n start: {\n line,\n column\n },\n end: {\n line,\n column: column + length\n }\n }\n )}\\n`;\n}\n"],"mappings":";;;;;;;;;;;;AA8BA,SAAgB,iBAAiB,OAAe,YAAwB;CACtE,MAAM,EAAE,OAAO,QAAQ,WAAW;CAClC,MAAM,SAAS,IAAI,gBAAgB,MAAM,CAAC,iBAAiB,OAAO;CAClE,IAAI,OAAO,QAAQ,QAAQ;CAC3B,IAAI,SAAS,QAAQ,UAAU;AAE/B;AACA;AAEA,QAAO,GAAG,oBAAoB,MAAM,CAAC,cAAc,KAAK,GAAG,OAAO,IAAI,iBACpE,OACA;EACE,OAAO;GACL;GACA;GACD;EACD,KAAK;GACH;GACA,QAAQ,SAAS;GAClB;EACF,CACF,CAAC"}
1
+ {"version":3,"file":"parse-error-Cu6mjBS7.mjs","names":[],"sources":["../src/utils/parse-error.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ParseError } from \"jsonc-parser\";\nimport { printParseErrorCode } from \"jsonc-parser\";\nimport { LinesAndColumns } from \"lines-and-columns\";\nimport { codeFrameColumns } from \"./code-frames\";\n\n/**\n * Nicely formats a JSON error with context\n *\n * @param input - JSON content as string\n * @param parseError - jsonc ParseError\n * @returns Formatted error message with context\n */\nexport function formatParseError(input: string, parseError: ParseError) {\n const { error, offset, length } = parseError;\n const result = new LinesAndColumns(input).locationForIndex(offset);\n let line = result?.line ?? 0;\n let column = result?.column ?? 0;\n\n line++;\n column++;\n\n return `${printParseErrorCode(error)} in JSON at ${line}:${column}\\n${codeFrameColumns(\n input,\n {\n start: {\n line,\n column\n },\n end: {\n line,\n column: column + length\n }\n }\n )}\\n`;\n}\n"],"mappings":";;;;;;;;;;;;AA8BA,SAAgB,iBAAiB,OAAe,YAAwB;CACtE,MAAM,EAAE,OAAO,QAAQ,WAAW;CAClC,MAAM,SAAS,IAAI,gBAAgB,MAAM,CAAC,iBAAiB,OAAO;CAClE,IAAI,OAAO,QAAQ,QAAQ;CAC3B,IAAI,SAAS,QAAQ,UAAU;AAE/B;AACA;AAEA,QAAO,GAAG,oBAAoB,MAAM,CAAC,cAAc,KAAK,GAAG,OAAO,IAAI,iBACpE,OACA;EACE,OAAO;GACL;GACA;GACD;EACD,KAAK;GACH;GACA,QAAQ,SAAS;GAClB;EACF,CACF,CAAC"}
@@ -6,4 +6,4 @@ declare function parse<T = unknown>(value: any, options?: Options): T;
6
6
  declare function safeParse<T = unknown>(value: any, options?: Options): T;
7
7
  //#endregion
8
8
  export { parse as n, safeParse as r, Options as t };
9
- //# sourceMappingURL=parse-fXy5pbmE.d.mts.map
9
+ //# sourceMappingURL=parse-ygKFNauQ.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse-fXy5pbmE.d.mts","names":[],"sources":["../src/utils/parse.ts"],"sourcesContent":[],"mappings":";UA4CiB,OAAA;EAAA,MAAA,CAAA,EAAA,OAAO;AAIxB;AAmEgB,iBAnEA,KAmE4C,CAAA,IAAA,OAAgB,CAAA,CAAA,KAAA,EAAA,GAAA,EAAA,OAAA,CAAA,EAnEpB,OAmEoB,CAAA,EAnEL,CAmEK;iBAA5D,6CAA4C,UAAe"}
1
+ {"version":3,"file":"parse-ygKFNauQ.d.cts","names":[],"sources":["../src/utils/parse.ts"],"sourcesContent":[],"mappings":";UA4CiB,OAAA;EAAA,MAAA,CAAA,EAAA,OAAO;AAIxB;AAmEgB,iBAnEA,KAmE4C,CAAA,IAAA,OAAgB,CAAA,CAAA,KAAA,EAAA,GAAA,EAAA,OAAA,CAAA,EAnEpB,OAmEoB,CAAA,EAnEL,CAmEK;iBAA5D,6CAA4C,UAAe"}
@@ -1,4 +1,4 @@
1
- const require_find_reference = require('../find-reference-De5vBQV2.cjs');
1
+ const require_find_reference = require('../find-reference-Ct8UDBo2.cjs');
2
2
 
3
3
  exports.find = require_find_reference.find;
4
4
  exports.isArrayEnd = require_find_reference.isArrayEnd;
@@ -1,2 +1,2 @@
1
- import { a as isArrayEnd, i as find, n as ObjectReference, o as isArrayReference, r as Reference, s as isObjectReference, t as ArrayReference } from "../find-reference-C-YleCds.cjs";
1
+ import { a as isArrayEnd, i as find, n as ObjectReference, o as isArrayReference, r as Reference, s as isObjectReference, t as ArrayReference } from "../find-reference-BuuNqqOh.cjs";
2
2
  export { ArrayReference, ObjectReference, Reference, find, isArrayEnd, isArrayReference, isObjectReference };
@@ -1,2 +1,2 @@
1
- import { a as isArrayEnd, i as find, n as ObjectReference, o as isArrayReference, r as Reference, s as isObjectReference, t as ArrayReference } from "../find-reference-B8xshNXL.mjs";
1
+ import { a as isArrayEnd, i as find, n as ObjectReference, o as isArrayReference, r as Reference, s as isObjectReference, t as ArrayReference } from "../find-reference-MHRH7HJ_.mjs";
2
2
  export { ArrayReference, ObjectReference, Reference, find, isArrayEnd, isArrayReference, isObjectReference };
@@ -1,3 +1,3 @@
1
- import { i as isObjectReference, n as isArrayEnd, r as isArrayReference, t as find } from "../find-reference-DMSYEaaI.mjs";
1
+ import { i as isObjectReference, n as isArrayEnd, r as isArrayReference, t as find } from "../find-reference-kPgdulJ1.mjs";
2
2
 
3
3
  export { find, isArrayEnd, isArrayReference, isObjectReference };
@@ -1,6 +1,6 @@
1
- const require_find_reference = require('../find-reference-De5vBQV2.cjs');
2
- const require_parse = require('../parse-Bp6kkcQ4.cjs');
3
- require('../pointer-B3W_Sme3.cjs');
1
+ const require_find_reference = require('../find-reference-Ct8UDBo2.cjs');
2
+ const require_parse = require('../parse-BSmqrTy_.cjs');
3
+ require('../pointer-Cvmor4sN.cjs');
4
4
 
5
5
  exports.escapePointerSegment = require_parse.escapePointerSegment;
6
6
  exports.find = require_find_reference.find;
@@ -1,3 +1,3 @@
1
- import { a as isArrayEnd, i as find, n as ObjectReference, o as isArrayReference, r as Reference, s as isObjectReference, t as ArrayReference } from "../find-reference-C-YleCds.cjs";
2
- import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-DZfi3d96.cjs";
1
+ import { a as isArrayEnd, i as find, n as ObjectReference, o as isArrayReference, r as Reference, s as isObjectReference, t as ArrayReference } from "../find-reference-BuuNqqOh.cjs";
2
+ import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-DCHSu_0u.cjs";
3
3
  export { ArrayReference, ObjectReference, Reference, escapePointerSegment, find, formatJsonPointer, isArrayEnd, isArrayReference, isInteger, isObjectReference, isRoot, isValidIndex, parent, parseJsonPointer, unescapePointerSegment };
@@ -1,3 +1,3 @@
1
- import { a as isArrayEnd, i as find, n as ObjectReference, o as isArrayReference, r as Reference, s as isObjectReference, t as ArrayReference } from "../find-reference-B8xshNXL.mjs";
2
- import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-Cj-YfhrI.mjs";
1
+ import { a as isArrayEnd, i as find, n as ObjectReference, o as isArrayReference, r as Reference, s as isObjectReference, t as ArrayReference } from "../find-reference-MHRH7HJ_.mjs";
2
+ import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-DaiwKCLz.mjs";
3
3
  export { ArrayReference, ObjectReference, Reference, escapePointerSegment, find, formatJsonPointer, isArrayEnd, isArrayReference, isInteger, isObjectReference, isRoot, isValidIndex, parent, parseJsonPointer, unescapePointerSegment };
@@ -1,5 +1,5 @@
1
- import { i as isObjectReference, n as isArrayEnd, r as isArrayReference, t as find } from "../find-reference-DMSYEaaI.mjs";
2
- import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-vw_qRD3F.mjs";
3
- import "../pointer-Dn__XOdY.mjs";
1
+ import { i as isObjectReference, n as isArrayEnd, r as isArrayReference, t as find } from "../find-reference-kPgdulJ1.mjs";
2
+ import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-B3NfTO06.mjs";
3
+ import "../pointer-DScQSL_a.mjs";
4
4
 
5
5
  export { escapePointerSegment, find, formatJsonPointer, isArrayEnd, isArrayReference, isInteger, isObjectReference, isRoot, isValidIndex, parent, parseJsonPointer, unescapePointerSegment };
@@ -1,4 +1,4 @@
1
- const require_parse = require('../parse-Bp6kkcQ4.cjs');
1
+ const require_parse = require('../parse-BSmqrTy_.cjs');
2
2
 
3
3
  exports.escapePointerSegment = require_parse.escapePointerSegment;
4
4
  exports.formatJsonPointer = require_parse.formatJsonPointer;
@@ -1,2 +1,2 @@
1
- import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-DZfi3d96.cjs";
1
+ import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-DCHSu_0u.cjs";
2
2
  export { escapePointerSegment, formatJsonPointer, isInteger, isRoot, isValidIndex, parent, parseJsonPointer, unescapePointerSegment };
@@ -1,2 +1,2 @@
1
- import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-Cj-YfhrI.mjs";
1
+ import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-DaiwKCLz.mjs";
2
2
  export { escapePointerSegment, formatJsonPointer, isInteger, isRoot, isValidIndex, parent, parseJsonPointer, unescapePointerSegment };
@@ -1,3 +1,3 @@
1
- import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-vw_qRD3F.mjs";
1
+ import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-B3NfTO06.mjs";
2
2
 
3
3
  export { escapePointerSegment, formatJsonPointer, isInteger, isRoot, isValidIndex, parent, parseJsonPointer, unescapePointerSegment };
@@ -1,4 +1,4 @@
1
- import { A as JsonSchema7PrimitiveLiteralType, I as JsonSchema7StringType, O as JsonSchema7ObjectType, R as JsonSchema7Type, b as JsonSchema7LiteralType, f as JsonSchema7AllOfType, h as JsonSchema7ArrayType } from "./types-Bn8rC098.cjs";
1
+ import { A as JsonSchema7PrimitiveLiteralType, D as JsonSchema7NumberType, I as JsonSchema7StringType, O as JsonSchema7ObjectType, R as JsonSchema7Type, _ as JsonSchema7BooleanType, b as JsonSchema7LiteralType, f as JsonSchema7AllOfType, h as JsonSchema7ArrayType } from "./types-BAtAPir9.mjs";
2
2
  import { StandardJSONSchemaV1 } from "@standard-schema/spec";
3
3
 
4
4
  //#region src/schema.d.ts
@@ -9,14 +9,35 @@ import { StandardJSONSchemaV1 } from "@standard-schema/spec";
9
9
  * @param schema - The schema to check
10
10
  * @returns True if the schema is a {@link JsonSchema7AllOfType}, false otherwise
11
11
  */
12
- declare function isJsonSchema7AllOfType(schema: JsonSchema7Type | JsonSchema7StringType): schema is JsonSchema7AllOfType;
12
+ declare function isJsonSchema7AllOfType(schema: JsonSchema7Type): schema is JsonSchema7AllOfType;
13
13
  /**
14
14
  * Type guard for {@link JsonSchema7ObjectType}
15
15
  *
16
16
  * @param schema - The schema to check
17
17
  * @returns True if the schema is a {@link JsonSchema7ObjectType}, false otherwise
18
18
  */
19
- declare function isJsonSchema7ObjectType(schema: JsonSchema7Type | JsonSchema7StringType): schema is JsonSchema7ObjectType;
19
+ declare function isJsonSchema7ObjectType(schema: JsonSchema7Type): schema is JsonSchema7ObjectType;
20
+ /**
21
+ * Type guard for {@link JsonSchema7StringType}
22
+ *
23
+ * @param schema - The schema to check
24
+ * @returns True if the schema is a {@link JsonSchema7StringType}, false otherwise
25
+ */
26
+ declare function isJsonSchema7StringType(schema: JsonSchema7Type): schema is JsonSchema7StringType;
27
+ /**
28
+ * Type guard for {@link JsonSchema7NumberType}
29
+ *
30
+ * @param schema - The schema to check
31
+ * @returns True if the schema is a {@link JsonSchema7NumberType}, false otherwise
32
+ */
33
+ declare function isJsonSchema7NumberType(schema: JsonSchema7Type): schema is JsonSchema7NumberType;
34
+ /**
35
+ * Type guard for {@link JsonSchema7BooleanType}
36
+ *
37
+ * @param schema - The schema to check
38
+ * @returns True if the schema is a {@link JsonSchema7BooleanType}, false otherwise
39
+ */
40
+ declare function isJsonSchema7BooleanType(schema: JsonSchema7Type): schema is JsonSchema7BooleanType;
20
41
  /**
21
42
  * Type guard for {@link JsonSchema7ArrayType}
22
43
  *
@@ -51,5 +72,5 @@ declare function isJsonSchema7LiteralType(schema: JsonSchema7Type): schema is Js
51
72
  */
52
73
  declare function isStandardJsonSchema<Input = unknown, Output = Input>(value: any): value is StandardJSONSchemaV1<Input, Output>;
53
74
  //#endregion
54
- export { isJsonSchema7PrimitiveLiteralType as a, isJsonSchema7ObjectType as i, isJsonSchema7ArrayType as n, isStandardJsonSchema as o, isJsonSchema7LiteralType as r, isJsonSchema7AllOfType as t };
55
- //# sourceMappingURL=schema-BO1HCrxv.d.cts.map
75
+ export { isJsonSchema7NumberType as a, isJsonSchema7StringType as c, isJsonSchema7LiteralType as i, isStandardJsonSchema as l, isJsonSchema7ArrayType as n, isJsonSchema7ObjectType as o, isJsonSchema7BooleanType as r, isJsonSchema7PrimitiveLiteralType as s, isJsonSchema7AllOfType as t };
76
+ //# sourceMappingURL=schema-B7wpjw3I.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-B7wpjw3I.d.mts","names":[],"sources":["../src/schema.ts"],"sourcesContent":[],"mappings":";;;;;;;AAuCA;AAgBA;AAgBA;AAYA;AAcgB,iBA1DA,sBAAA,CA2DN,MAAA,EA1DA,eA2DG,CAAA,EAAA,MAAA,IA1DA,oBA0DsB;AAUnC;AAYA;AAwBA;AAyBA;;;AAEwC,iBArHxB,uBAAA,CAqHwB,MAAA,EApH9B,eAoH8B,CAAA,EAAA,MAAA,IAnH3B,qBAmH2B;;;;;;;iBArGxB,uBAAA,SACN,4BACG;;;;;;;iBAUG,uBAAA,SACN,4BACG;;;;;;;iBAYG,wBAAA,SACN,4BACG;;;;;;;iBAUG,sBAAA,SACN,4BACG;;;;;;;iBAUG,iCAAA,SACN,4BACG;;;;;;;iBAsBG,wBAAA,SACN,4BACG;;;;;;;;;;;;iBAuBG,+CAA+C,6BAEnD,qBAAqB,OAAO"}
@@ -1,4 +1,4 @@
1
- const require_is_set_object = require('./is-set-object-BmHip9em.cjs');
1
+ const require_is_set_object = require('./is-set-object-5lZPw_Pq.cjs');
2
2
 
3
3
  //#region src/schema.ts
4
4
  /**
@@ -22,6 +22,33 @@ function isJsonSchema7ObjectType(schema) {
22
22
  return "properties" in schema;
23
23
  }
24
24
  /**
25
+ * Type guard for {@link JsonSchema7StringType}
26
+ *
27
+ * @param schema - The schema to check
28
+ * @returns True if the schema is a {@link JsonSchema7StringType}, false otherwise
29
+ */
30
+ function isJsonSchema7StringType(schema) {
31
+ return "type" in schema && schema.type === "string";
32
+ }
33
+ /**
34
+ * Type guard for {@link JsonSchema7NumberType}
35
+ *
36
+ * @param schema - The schema to check
37
+ * @returns True if the schema is a {@link JsonSchema7NumberType}, false otherwise
38
+ */
39
+ function isJsonSchema7NumberType(schema) {
40
+ return "type" in schema && (schema.type === "number" || schema.type === "integer");
41
+ }
42
+ /**
43
+ * Type guard for {@link JsonSchema7BooleanType}
44
+ *
45
+ * @param schema - The schema to check
46
+ * @returns True if the schema is a {@link JsonSchema7BooleanType}, false otherwise
47
+ */
48
+ function isJsonSchema7BooleanType(schema) {
49
+ return "type" in schema && schema.type === "boolean";
50
+ }
51
+ /**
25
52
  * Type guard for {@link JsonSchema7ArrayType}
26
53
  *
27
54
  * @param schema - The schema to check
@@ -80,12 +107,24 @@ Object.defineProperty(exports, 'isJsonSchema7ArrayType', {
80
107
  return isJsonSchema7ArrayType;
81
108
  }
82
109
  });
110
+ Object.defineProperty(exports, 'isJsonSchema7BooleanType', {
111
+ enumerable: true,
112
+ get: function () {
113
+ return isJsonSchema7BooleanType;
114
+ }
115
+ });
83
116
  Object.defineProperty(exports, 'isJsonSchema7LiteralType', {
84
117
  enumerable: true,
85
118
  get: function () {
86
119
  return isJsonSchema7LiteralType;
87
120
  }
88
121
  });
122
+ Object.defineProperty(exports, 'isJsonSchema7NumberType', {
123
+ enumerable: true,
124
+ get: function () {
125
+ return isJsonSchema7NumberType;
126
+ }
127
+ });
89
128
  Object.defineProperty(exports, 'isJsonSchema7ObjectType', {
90
129
  enumerable: true,
91
130
  get: function () {
@@ -98,6 +137,12 @@ Object.defineProperty(exports, 'isJsonSchema7PrimitiveLiteralType', {
98
137
  return isJsonSchema7PrimitiveLiteralType;
99
138
  }
100
139
  });
140
+ Object.defineProperty(exports, 'isJsonSchema7StringType', {
141
+ enumerable: true,
142
+ get: function () {
143
+ return isJsonSchema7StringType;
144
+ }
145
+ });
101
146
  Object.defineProperty(exports, 'isStandardJsonSchema', {
102
147
  enumerable: true,
103
148
  get: function () {
@@ -1,4 +1,4 @@
1
- import { A as JsonSchema7PrimitiveLiteralType, I as JsonSchema7StringType, O as JsonSchema7ObjectType, R as JsonSchema7Type, b as JsonSchema7LiteralType, f as JsonSchema7AllOfType, h as JsonSchema7ArrayType } from "./types-CPQlxauZ.mjs";
1
+ import { A as JsonSchema7PrimitiveLiteralType, D as JsonSchema7NumberType, I as JsonSchema7StringType, O as JsonSchema7ObjectType, R as JsonSchema7Type, _ as JsonSchema7BooleanType, b as JsonSchema7LiteralType, f as JsonSchema7AllOfType, h as JsonSchema7ArrayType } from "./types-BzNIRhpI.cjs";
2
2
  import { StandardJSONSchemaV1 } from "@standard-schema/spec";
3
3
 
4
4
  //#region src/schema.d.ts
@@ -9,14 +9,35 @@ import { StandardJSONSchemaV1 } from "@standard-schema/spec";
9
9
  * @param schema - The schema to check
10
10
  * @returns True if the schema is a {@link JsonSchema7AllOfType}, false otherwise
11
11
  */
12
- declare function isJsonSchema7AllOfType(schema: JsonSchema7Type | JsonSchema7StringType): schema is JsonSchema7AllOfType;
12
+ declare function isJsonSchema7AllOfType(schema: JsonSchema7Type): schema is JsonSchema7AllOfType;
13
13
  /**
14
14
  * Type guard for {@link JsonSchema7ObjectType}
15
15
  *
16
16
  * @param schema - The schema to check
17
17
  * @returns True if the schema is a {@link JsonSchema7ObjectType}, false otherwise
18
18
  */
19
- declare function isJsonSchema7ObjectType(schema: JsonSchema7Type | JsonSchema7StringType): schema is JsonSchema7ObjectType;
19
+ declare function isJsonSchema7ObjectType(schema: JsonSchema7Type): schema is JsonSchema7ObjectType;
20
+ /**
21
+ * Type guard for {@link JsonSchema7StringType}
22
+ *
23
+ * @param schema - The schema to check
24
+ * @returns True if the schema is a {@link JsonSchema7StringType}, false otherwise
25
+ */
26
+ declare function isJsonSchema7StringType(schema: JsonSchema7Type): schema is JsonSchema7StringType;
27
+ /**
28
+ * Type guard for {@link JsonSchema7NumberType}
29
+ *
30
+ * @param schema - The schema to check
31
+ * @returns True if the schema is a {@link JsonSchema7NumberType}, false otherwise
32
+ */
33
+ declare function isJsonSchema7NumberType(schema: JsonSchema7Type): schema is JsonSchema7NumberType;
34
+ /**
35
+ * Type guard for {@link JsonSchema7BooleanType}
36
+ *
37
+ * @param schema - The schema to check
38
+ * @returns True if the schema is a {@link JsonSchema7BooleanType}, false otherwise
39
+ */
40
+ declare function isJsonSchema7BooleanType(schema: JsonSchema7Type): schema is JsonSchema7BooleanType;
20
41
  /**
21
42
  * Type guard for {@link JsonSchema7ArrayType}
22
43
  *
@@ -51,5 +72,5 @@ declare function isJsonSchema7LiteralType(schema: JsonSchema7Type): schema is Js
51
72
  */
52
73
  declare function isStandardJsonSchema<Input = unknown, Output = Input>(value: any): value is StandardJSONSchemaV1<Input, Output>;
53
74
  //#endregion
54
- export { isJsonSchema7PrimitiveLiteralType as a, isJsonSchema7ObjectType as i, isJsonSchema7ArrayType as n, isStandardJsonSchema as o, isJsonSchema7LiteralType as r, isJsonSchema7AllOfType as t };
55
- //# sourceMappingURL=schema-CmH1V_uI.d.mts.map
75
+ export { isJsonSchema7NumberType as a, isJsonSchema7StringType as c, isJsonSchema7LiteralType as i, isStandardJsonSchema as l, isJsonSchema7ArrayType as n, isJsonSchema7ObjectType as o, isJsonSchema7BooleanType as r, isJsonSchema7PrimitiveLiteralType as s, isJsonSchema7AllOfType as t };
76
+ //# sourceMappingURL=schema-BgOm_N0w.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-BgOm_N0w.d.cts","names":[],"sources":["../src/schema.ts"],"sourcesContent":[],"mappings":";;;;;;;AAuCA;AAgBA;AAgBA;AAYA;AAcgB,iBA1DA,sBAAA,CA2DN,MAAA,EA1DA,eA2DG,CAAA,EAAA,MAAA,IA1DA,oBA0DsB;AAUnC;AAYA;AAwBA;AAyBA;;;AAEwC,iBArHxB,uBAAA,CAqHwB,MAAA,EApH9B,eAoH8B,CAAA,EAAA,MAAA,IAnH3B,qBAmH2B;;;;;;;iBArGxB,uBAAA,SACN,4BACG;;;;;;;iBAUG,uBAAA,SACN,4BACG;;;;;;;iBAYG,wBAAA,SACN,4BACG;;;;;;;iBAUG,sBAAA,SACN,4BACG;;;;;;;iBAUG,iCAAA,SACN,4BACG;;;;;;;iBAsBG,wBAAA,SACN,4BACG;;;;;;;;;;;;iBAuBG,+CAA+C,6BAEnD,qBAAqB,OAAO"}