@aidc-toolkit/gs1 1.0.43-beta → 1.0.43

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 (220) hide show
  1. package/dist/index.cjs +19 -0
  2. package/dist/index.d.cts +2205 -0
  3. package/dist/index.d.ts +2205 -63
  4. package/dist/index.js +3 -36
  5. package/package.json +4 -4
  6. package/tsconfig-src.tsbuildinfo +1 -1
  7. package/dist/abstract-identifier-creator.d.ts +0 -41
  8. package/dist/abstract-identifier-creator.d.ts.map +0 -1
  9. package/dist/abstract-identifier-creator.js +0 -73
  10. package/dist/abstract-identifier-creator.js.map +0 -1
  11. package/dist/abstract-non-gtin-numeric-identifier-creator.d.ts +0 -36
  12. package/dist/abstract-non-gtin-numeric-identifier-creator.d.ts.map +0 -1
  13. package/dist/abstract-non-gtin-numeric-identifier-creator.js +0 -37
  14. package/dist/abstract-non-gtin-numeric-identifier-creator.js.map +0 -1
  15. package/dist/abstract-numeric-identifier-creator.d.ts +0 -34
  16. package/dist/abstract-numeric-identifier-creator.d.ts.map +0 -1
  17. package/dist/abstract-numeric-identifier-creator.js +0 -154
  18. package/dist/abstract-numeric-identifier-creator.js.map +0 -1
  19. package/dist/character-set.d.ts +0 -27
  20. package/dist/character-set.d.ts.map +0 -1
  21. package/dist/character-set.js +0 -83
  22. package/dist/character-set.js.map +0 -1
  23. package/dist/check.d.ts +0 -81
  24. package/dist/check.d.ts.map +0 -1
  25. package/dist/check.js +0 -218
  26. package/dist/check.js.map +0 -1
  27. package/dist/content-character-set-creators.d.ts +0 -4
  28. package/dist/content-character-set-creators.d.ts.map +0 -1
  29. package/dist/content-character-set-creators.js +0 -9
  30. package/dist/content-character-set-creators.js.map +0 -1
  31. package/dist/content-character-set.d.ts +0 -26
  32. package/dist/content-character-set.d.ts.map +0 -1
  33. package/dist/content-character-set.js +0 -18
  34. package/dist/content-character-set.js.map +0 -1
  35. package/dist/gcp-length-cache.d.ts +0 -86
  36. package/dist/gcp-length-cache.d.ts.map +0 -1
  37. package/dist/gcp-length-cache.js +0 -237
  38. package/dist/gcp-length-cache.js.map +0 -1
  39. package/dist/gcp-length-data.d.ts +0 -108
  40. package/dist/gcp-length-data.d.ts.map +0 -1
  41. package/dist/gcp-length-data.js +0 -53
  42. package/dist/gcp-length-data.js.map +0 -1
  43. package/dist/gcp-length.d.ts +0 -97
  44. package/dist/gcp-length.d.ts.map +0 -1
  45. package/dist/gcp-length.js +0 -368
  46. package/dist/gcp-length.js.map +0 -1
  47. package/dist/gtin-creator.d.ts +0 -47
  48. package/dist/gtin-creator.d.ts.map +0 -1
  49. package/dist/gtin-creator.js +0 -64
  50. package/dist/gtin-creator.js.map +0 -1
  51. package/dist/gtin-descriptor.d.ts +0 -22
  52. package/dist/gtin-descriptor.d.ts.map +0 -1
  53. package/dist/gtin-descriptor.js +0 -2
  54. package/dist/gtin-descriptor.js.map +0 -1
  55. package/dist/gtin-length.d.ts +0 -64
  56. package/dist/gtin-length.d.ts.map +0 -1
  57. package/dist/gtin-length.js +0 -36
  58. package/dist/gtin-length.js.map +0 -1
  59. package/dist/gtin-type.d.ts +0 -26
  60. package/dist/gtin-type.d.ts.map +0 -1
  61. package/dist/gtin-type.js +0 -7
  62. package/dist/gtin-type.js.map +0 -1
  63. package/dist/gtin-validator.d.ts +0 -132
  64. package/dist/gtin-validator.d.ts.map +0 -1
  65. package/dist/gtin-validator.js +0 -349
  66. package/dist/gtin-validator.js.map +0 -1
  67. package/dist/identifier-creator.d.ts +0 -31
  68. package/dist/identifier-creator.d.ts.map +0 -1
  69. package/dist/identifier-creator.js +0 -2
  70. package/dist/identifier-creator.js.map +0 -1
  71. package/dist/identifier-creators.d.ts +0 -118
  72. package/dist/identifier-creators.d.ts.map +0 -1
  73. package/dist/identifier-creators.js +0 -92
  74. package/dist/identifier-creators.js.map +0 -1
  75. package/dist/identifier-descriptor.d.ts +0 -27
  76. package/dist/identifier-descriptor.d.ts.map +0 -1
  77. package/dist/identifier-descriptor.js +0 -2
  78. package/dist/identifier-descriptor.js.map +0 -1
  79. package/dist/identifier-descriptors.d.ts +0 -106
  80. package/dist/identifier-descriptors.d.ts.map +0 -1
  81. package/dist/identifier-descriptors.js +0 -262
  82. package/dist/identifier-descriptors.js.map +0 -1
  83. package/dist/identifier-extension.d.ts +0 -82
  84. package/dist/identifier-extension.d.ts.map +0 -1
  85. package/dist/identifier-extension.js +0 -79
  86. package/dist/identifier-extension.js.map +0 -1
  87. package/dist/identifier-type.d.ts +0 -62
  88. package/dist/identifier-type.d.ts.map +0 -1
  89. package/dist/identifier-type.js +0 -54
  90. package/dist/identifier-type.js.map +0 -1
  91. package/dist/identifier-validator.d.ts +0 -85
  92. package/dist/identifier-validator.d.ts.map +0 -1
  93. package/dist/identifier-validator.js +0 -107
  94. package/dist/identifier-validator.js.map +0 -1
  95. package/dist/identifier-validators.d.ts +0 -131
  96. package/dist/identifier-validators.d.ts.map +0 -1
  97. package/dist/identifier-validators.js +0 -167
  98. package/dist/identifier-validators.js.map +0 -1
  99. package/dist/index.d.ts.map +0 -1
  100. package/dist/index.js.map +0 -1
  101. package/dist/leader-type.d.ts +0 -26
  102. package/dist/leader-type.d.ts.map +0 -1
  103. package/dist/leader-type.js +0 -18
  104. package/dist/leader-type.js.map +0 -1
  105. package/dist/locale/en/locale-resources.d.ts +0 -48
  106. package/dist/locale/en/locale-resources.d.ts.map +0 -1
  107. package/dist/locale/en/locale-resources.js +0 -47
  108. package/dist/locale/en/locale-resources.js.map +0 -1
  109. package/dist/locale/fr/locale-resources.d.ts +0 -48
  110. package/dist/locale/fr/locale-resources.d.ts.map +0 -1
  111. package/dist/locale/fr/locale-resources.js +0 -47
  112. package/dist/locale/fr/locale-resources.js.map +0 -1
  113. package/dist/locale/i18n.d.ts +0 -27
  114. package/dist/locale/i18n.d.ts.map +0 -1
  115. package/dist/locale/i18n.js +0 -35
  116. package/dist/locale/i18n.js.map +0 -1
  117. package/dist/non-gtin-numeric-identifier-creator.d.ts +0 -12
  118. package/dist/non-gtin-numeric-identifier-creator.d.ts.map +0 -1
  119. package/dist/non-gtin-numeric-identifier-creator.js +0 -2
  120. package/dist/non-gtin-numeric-identifier-creator.js.map +0 -1
  121. package/dist/non-gtin-numeric-identifier-descriptor.d.ts +0 -22
  122. package/dist/non-gtin-numeric-identifier-descriptor.d.ts.map +0 -1
  123. package/dist/non-gtin-numeric-identifier-descriptor.js +0 -2
  124. package/dist/non-gtin-numeric-identifier-descriptor.js.map +0 -1
  125. package/dist/non-gtin-numeric-identifier-type.d.ts +0 -26
  126. package/dist/non-gtin-numeric-identifier-type.d.ts.map +0 -1
  127. package/dist/non-gtin-numeric-identifier-type.js +0 -8
  128. package/dist/non-gtin-numeric-identifier-type.js.map +0 -1
  129. package/dist/non-gtin-numeric-identifier-validator.d.ts +0 -12
  130. package/dist/non-gtin-numeric-identifier-validator.d.ts.map +0 -1
  131. package/dist/non-gtin-numeric-identifier-validator.js +0 -10
  132. package/dist/non-gtin-numeric-identifier-validator.js.map +0 -1
  133. package/dist/non-numeric-identifier-creator.d.ts +0 -40
  134. package/dist/non-numeric-identifier-creator.d.ts.map +0 -1
  135. package/dist/non-numeric-identifier-creator.js +0 -82
  136. package/dist/non-numeric-identifier-creator.js.map +0 -1
  137. package/dist/non-numeric-identifier-descriptor.d.ts +0 -26
  138. package/dist/non-numeric-identifier-descriptor.d.ts.map +0 -1
  139. package/dist/non-numeric-identifier-descriptor.js +0 -2
  140. package/dist/non-numeric-identifier-descriptor.js.map +0 -1
  141. package/dist/non-numeric-identifier-type.d.ts +0 -26
  142. package/dist/non-numeric-identifier-type.d.ts.map +0 -1
  143. package/dist/non-numeric-identifier-type.js +0 -8
  144. package/dist/non-numeric-identifier-type.js.map +0 -1
  145. package/dist/non-numeric-identifier-validator.d.ts +0 -41
  146. package/dist/non-numeric-identifier-validator.d.ts.map +0 -1
  147. package/dist/non-numeric-identifier-validator.js +0 -69
  148. package/dist/non-numeric-identifier-validator.js.map +0 -1
  149. package/dist/non-serializable-numeric-identifier-creator.d.ts +0 -10
  150. package/dist/non-serializable-numeric-identifier-creator.d.ts.map +0 -1
  151. package/dist/non-serializable-numeric-identifier-creator.js +0 -8
  152. package/dist/non-serializable-numeric-identifier-creator.js.map +0 -1
  153. package/dist/non-serializable-numeric-identifier-descriptor.d.ts +0 -12
  154. package/dist/non-serializable-numeric-identifier-descriptor.d.ts.map +0 -1
  155. package/dist/non-serializable-numeric-identifier-descriptor.js +0 -2
  156. package/dist/non-serializable-numeric-identifier-descriptor.js.map +0 -1
  157. package/dist/non-serializable-numeric-identifier-type.d.ts +0 -26
  158. package/dist/non-serializable-numeric-identifier-type.d.ts.map +0 -1
  159. package/dist/non-serializable-numeric-identifier-type.js +0 -7
  160. package/dist/non-serializable-numeric-identifier-type.js.map +0 -1
  161. package/dist/non-serializable-numeric-identifier-validator.d.ts +0 -16
  162. package/dist/non-serializable-numeric-identifier-validator.d.ts.map +0 -1
  163. package/dist/non-serializable-numeric-identifier-validator.js +0 -17
  164. package/dist/non-serializable-numeric-identifier-validator.js.map +0 -1
  165. package/dist/numeric-identifier-creator.d.ts +0 -53
  166. package/dist/numeric-identifier-creator.d.ts.map +0 -1
  167. package/dist/numeric-identifier-creator.js +0 -2
  168. package/dist/numeric-identifier-creator.js.map +0 -1
  169. package/dist/numeric-identifier-descriptor.d.ts +0 -22
  170. package/dist/numeric-identifier-descriptor.d.ts.map +0 -1
  171. package/dist/numeric-identifier-descriptor.js +0 -2
  172. package/dist/numeric-identifier-descriptor.js.map +0 -1
  173. package/dist/numeric-identifier-type.d.ts +0 -26
  174. package/dist/numeric-identifier-type.d.ts.map +0 -1
  175. package/dist/numeric-identifier-type.js +0 -7
  176. package/dist/numeric-identifier-type.js.map +0 -1
  177. package/dist/numeric-identifier-validator.d.ts +0 -38
  178. package/dist/numeric-identifier-validator.d.ts.map +0 -1
  179. package/dist/numeric-identifier-validator.js +0 -61
  180. package/dist/numeric-identifier-validator.js.map +0 -1
  181. package/dist/prefix-manager.d.ts +0 -151
  182. package/dist/prefix-manager.d.ts.map +0 -1
  183. package/dist/prefix-manager.js +0 -297
  184. package/dist/prefix-manager.js.map +0 -1
  185. package/dist/prefix-provider.d.ts +0 -27
  186. package/dist/prefix-provider.d.ts.map +0 -1
  187. package/dist/prefix-provider.js +0 -2
  188. package/dist/prefix-provider.js.map +0 -1
  189. package/dist/prefix-type.d.ts +0 -26
  190. package/dist/prefix-type.d.ts.map +0 -1
  191. package/dist/prefix-type.js +0 -18
  192. package/dist/prefix-type.js.map +0 -1
  193. package/dist/prefix-validator.d.ts +0 -71
  194. package/dist/prefix-validator.d.ts.map +0 -1
  195. package/dist/prefix-validator.js +0 -204
  196. package/dist/prefix-validator.js.map +0 -1
  197. package/dist/serializable-numeric-identifier-creator.d.ts +0 -48
  198. package/dist/serializable-numeric-identifier-creator.d.ts.map +0 -1
  199. package/dist/serializable-numeric-identifier-creator.js +0 -93
  200. package/dist/serializable-numeric-identifier-creator.js.map +0 -1
  201. package/dist/serializable-numeric-identifier-descriptor.d.ts +0 -26
  202. package/dist/serializable-numeric-identifier-descriptor.d.ts.map +0 -1
  203. package/dist/serializable-numeric-identifier-descriptor.js +0 -2
  204. package/dist/serializable-numeric-identifier-descriptor.js.map +0 -1
  205. package/dist/serializable-numeric-identifier-type.d.ts +0 -26
  206. package/dist/serializable-numeric-identifier-type.d.ts.map +0 -1
  207. package/dist/serializable-numeric-identifier-type.js +0 -8
  208. package/dist/serializable-numeric-identifier-type.js.map +0 -1
  209. package/dist/serializable-numeric-identifier-validator.d.ts +0 -67
  210. package/dist/serializable-numeric-identifier-validator.d.ts.map +0 -1
  211. package/dist/serializable-numeric-identifier-validator.js +0 -97
  212. package/dist/serializable-numeric-identifier-validator.js.map +0 -1
  213. package/dist/variable-measure.d.ts +0 -68
  214. package/dist/variable-measure.d.ts.map +0 -1
  215. package/dist/variable-measure.js +0 -210
  216. package/dist/variable-measure.js.map +0 -1
  217. package/dist/verified-by-gs1.d.ts +0 -22
  218. package/dist/verified-by-gs1.d.ts.map +0 -1
  219. package/dist/verified-by-gs1.js +0 -46
  220. package/dist/verified-by-gs1.js.map +0 -1
@@ -1,118 +0,0 @@
1
- import { GTINCreator } from "./gtin-creator.js";
2
- import type { GTINBaseLength } from "./gtin-length.js";
3
- import type { GTINType } from "./gtin-type.js";
4
- import type { IdentifierCreator } from "./identifier-creator.js";
5
- import { type IdentifierTypeExtension } from "./identifier-extension.js";
6
- import type { IdentifierType } from "./identifier-type.js";
7
- import type { NonGTINNumericIdentifierCreator } from "./non-gtin-numeric-identifier-creator.js";
8
- import { NonNumericIdentifierCreator } from "./non-numeric-identifier-creator.js";
9
- import { NonSerializableNumericIdentifierCreator } from "./non-serializable-numeric-identifier-creator.js";
10
- import type { NumericIdentifierCreator } from "./numeric-identifier-creator.js";
11
- import type { PrefixProvider } from "./prefix-provider.js";
12
- import { SerializableNumericIdentifierCreator } from "./serializable-numeric-identifier-creator.js";
13
- /**
14
- * Identifier creator type based on identifier type type.
15
- *
16
- * @template TIdentifierType
17
- * Identifier type type.
18
- */
19
- export type IdentifierTypeCreator<TIdentifierType extends IdentifierType> = IdentifierTypeExtension<TIdentifierType, IdentifierCreator, NumericIdentifierCreator, GTINCreator, NonGTINNumericIdentifierCreator, NonSerializableNumericIdentifierCreator, SerializableNumericIdentifierCreator, NonNumericIdentifierCreator>;
20
- /**
21
- * Identifier creators entry type based on identifier type type.
22
- *
23
- * @template TIdentifierType
24
- * Identifier type type.
25
- */
26
- export type IdentifierCreatorsEntry<TIdentifierType extends IdentifierType> = IdentifierTypeCreator<TIdentifierType>;
27
- /**
28
- * Identifier creators record type.
29
- */
30
- export type IdentifierCreatorsRecord = {
31
- [TIdentifierType in IdentifierType]: IdentifierCreatorsEntry<TIdentifierType>;
32
- };
33
- /**
34
- * GTIN creator constructor type.
35
- */
36
- export type GTINCreatorConstructor = new (prefixProvider: PrefixProvider, gtinBaseLength: GTINBaseLength) => GTINCreator;
37
- /**
38
- * Non-GTIN creator constructor type.
39
- *
40
- * @template TIdentifierType
41
- * Identifier type type.
42
- */
43
- export type NonGTINCreatorConstructor<TIdentifierType extends Exclude<IdentifierType, GTINType>> = new (prefixProvider: PrefixProvider, identifierType: TIdentifierType) => IdentifierCreatorsRecord[TIdentifierType];
44
- /**
45
- * Identifier creator constructors entry type based on identifier type type.
46
- *
47
- * @template TIdentifierType
48
- * Identifier type type.
49
- */
50
- export type IdentifierCreatorConstructorsEntry<TIdentifierType extends IdentifierType> = TIdentifierType extends GTINType ? GTINCreatorConstructor : NonGTINCreatorConstructor<Exclude<TIdentifierType, GTINType>>;
51
- /**
52
- * Identifier creator constructors record type.
53
- */
54
- export type IdentifierCreatorConstructorsRecord = {
55
- readonly [TIdentifierType in IdentifierType]: IdentifierCreatorConstructorsEntry<TIdentifierType>;
56
- };
57
- export declare const IdentifierCreatorConstructors: IdentifierCreatorConstructorsRecord;
58
- /**
59
- * Determine if identifier creator is a numeric identifier creator.
60
- *
61
- * @param identifierCreator
62
- * Identifier creator.
63
- *
64
- * @returns
65
- * True if identifier creator is a numeric identifier creator.
66
- */
67
- export declare function isNumericIdentifierCreator(identifierCreator: IdentifierCreator): identifierCreator is NumericIdentifierCreator;
68
- /**
69
- * Determine if identifier creator is a GTIN creator.
70
- *
71
- * @param identifierCreator
72
- * Identifier creator.
73
- *
74
- * @returns
75
- * True if identifier creator is a GTIN creator.
76
- */
77
- export declare function isGTINCreator(identifierCreator: IdentifierCreator): identifierCreator is GTINCreator;
78
- /**
79
- * Determine if identifier creator is a non-GTIN numeric identifier creator.
80
- *
81
- * @param identifierCreator
82
- * Identifier creator.
83
- *
84
- * @returns
85
- * True if identifier creator is a non-GTIN numeric identifier creator.
86
- */
87
- export declare function isNonGTINNumericIdentifierCreator(identifierCreator: IdentifierCreator): identifierCreator is NonGTINNumericIdentifierCreator;
88
- /**
89
- * Determine if identifier creator is a non-serializable numeric identifier creator.
90
- *
91
- * @param identifierCreator
92
- * Identifier creator.
93
- *
94
- * @returns
95
- * True if identifier creator is a non-serializable numeric identifier creator.
96
- */
97
- export declare function isNonSerializableNumericIdentifierCreator(identifierCreator: IdentifierCreator): identifierCreator is NonSerializableNumericIdentifierCreator;
98
- /**
99
- * Determine if identifier creator is a serializable numeric identifier creator.
100
- *
101
- * @param identifierCreator
102
- * Identifier creator.
103
- *
104
- * @returns
105
- * True if identifier creator is a serializable numeric identifier creator.
106
- */
107
- export declare function isSerializableNumericIdentifierCreator(identifierCreator: IdentifierCreator): identifierCreator is SerializableNumericIdentifierCreator;
108
- /**
109
- * Determine if identifier creator is a non-numeric identifier creator.
110
- *
111
- * @param identifierCreator
112
- * Identifier creator.
113
- *
114
- * @returns
115
- * True if identifier creator is a non-numeric identifier creator.
116
- */
117
- export declare function isNonNumericIdentifierCreator(identifierCreator: IdentifierCreator): identifierCreator is NonNumericIdentifierCreator;
118
- //# sourceMappingURL=identifier-creators.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identifier-creators.d.ts","sourceRoot":"","sources":["../src/identifier-creators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EACH,KAAK,uBAAuB,EAO/B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAC;AAChG,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAC3G,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,KAAK,EAAE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AiB,GAAG,iBAAiB,IAAI,wBAAwB,CAE9H;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,iBAAiB,IAAI,WAAW,CAEpG;AAED;;;;;;;;GAQG;AACH,wBAAgB,iCAAiC,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,iBAAiB,IAAI,+BAA+B,CAE5I;AAED;;;;;;;;GAQG;AACH,wBAAgB,yCAAyC,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,iBAAiB,IAAI,uCAAuC,CAE5J;AAED;;;;;;;;GAQG;AACH,wBAAgB,sCAAsC,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,iBAAiB,IAAI,oCAAoC,CAEtJ;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,iBAAiB,IAAI,2BAA2B,CAEpI"}
@@ -1,92 +0,0 @@
1
- import { GTINCreator } from "./gtin-creator.js";
2
- import { isGTINExtension, isNonGTINNumericIdentifierExtension, isNonNumericIdentifierExtension, isNonSerializableNumericIdentifierExtension, isNumericIdentifierExtension, isSerializableNumericIdentifierExtension } from "./identifier-extension.js";
3
- import { NonNumericIdentifierCreator } from "./non-numeric-identifier-creator.js";
4
- import { NonSerializableNumericIdentifierCreator } from "./non-serializable-numeric-identifier-creator.js";
5
- import { SerializableNumericIdentifierCreator } from "./serializable-numeric-identifier-creator.js";
6
- export const IdentifierCreatorConstructors = {
7
- GTIN: GTINCreator,
8
- GLN: NonSerializableNumericIdentifierCreator,
9
- SSCC: NonSerializableNumericIdentifierCreator,
10
- GRAI: SerializableNumericIdentifierCreator,
11
- GIAI: NonNumericIdentifierCreator,
12
- GSRN: NonSerializableNumericIdentifierCreator,
13
- GDTI: SerializableNumericIdentifierCreator,
14
- GINC: NonNumericIdentifierCreator,
15
- GSIN: NonSerializableNumericIdentifierCreator,
16
- GCN: SerializableNumericIdentifierCreator,
17
- CPID: NonNumericIdentifierCreator,
18
- GMN: NonNumericIdentifierCreator
19
- };
20
- /**
21
- * Determine if identifier creator is a numeric identifier creator.
22
- *
23
- * @param identifierCreator
24
- * Identifier creator.
25
- *
26
- * @returns
27
- * True if identifier creator is a numeric identifier creator.
28
- */
29
- export function isNumericIdentifierCreator(identifierCreator) {
30
- return isNumericIdentifierExtension(identifierCreator);
31
- }
32
- /**
33
- * Determine if identifier creator is a GTIN creator.
34
- *
35
- * @param identifierCreator
36
- * Identifier creator.
37
- *
38
- * @returns
39
- * True if identifier creator is a GTIN creator.
40
- */
41
- export function isGTINCreator(identifierCreator) {
42
- return isGTINExtension(identifierCreator);
43
- }
44
- /**
45
- * Determine if identifier creator is a non-GTIN numeric identifier creator.
46
- *
47
- * @param identifierCreator
48
- * Identifier creator.
49
- *
50
- * @returns
51
- * True if identifier creator is a non-GTIN numeric identifier creator.
52
- */
53
- export function isNonGTINNumericIdentifierCreator(identifierCreator) {
54
- return isNonGTINNumericIdentifierExtension(identifierCreator);
55
- }
56
- /**
57
- * Determine if identifier creator is a non-serializable numeric identifier creator.
58
- *
59
- * @param identifierCreator
60
- * Identifier creator.
61
- *
62
- * @returns
63
- * True if identifier creator is a non-serializable numeric identifier creator.
64
- */
65
- export function isNonSerializableNumericIdentifierCreator(identifierCreator) {
66
- return isNonSerializableNumericIdentifierExtension(identifierCreator);
67
- }
68
- /**
69
- * Determine if identifier creator is a serializable numeric identifier creator.
70
- *
71
- * @param identifierCreator
72
- * Identifier creator.
73
- *
74
- * @returns
75
- * True if identifier creator is a serializable numeric identifier creator.
76
- */
77
- export function isSerializableNumericIdentifierCreator(identifierCreator) {
78
- return isSerializableNumericIdentifierExtension(identifierCreator);
79
- }
80
- /**
81
- * Determine if identifier creator is a non-numeric identifier creator.
82
- *
83
- * @param identifierCreator
84
- * Identifier creator.
85
- *
86
- * @returns
87
- * True if identifier creator is a non-numeric identifier creator.
88
- */
89
- export function isNonNumericIdentifierCreator(identifierCreator) {
90
- return isNonNumericIdentifierExtension(identifierCreator);
91
- }
92
- //# sourceMappingURL=identifier-creators.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identifier-creators.js","sourceRoot":"","sources":["../src/identifier-creators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,OAAO,EAEH,eAAe,EACf,mCAAmC,EACnC,+BAA+B,EAC/B,2CAA2C,EAC3C,4BAA4B,EAC5B,wCAAwC,EAC3C,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAG3G,OAAO,EAAE,oCAAoC,EAAE,MAAM,8CAA8C,CAAC;AAkEpG,MAAM,CAAC,MAAM,6BAA6B,GAAwC;IAC9E,IAAI,EAAE,WAAW;IACjB,GAAG,EAAE,uCAAuC;IAC5C,IAAI,EAAE,uCAAuC;IAC7C,IAAI,EAAE,oCAAoC;IAC1C,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,uCAAuC;IAC7C,IAAI,EAAE,oCAAoC;IAC1C,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,uCAAuC;IAC7C,GAAG,EAAE,oCAAoC;IACzC,IAAI,EAAE,2BAA2B;IACjC,GAAG,EAAE,2BAA2B;CACnC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,0BAA0B,CAAC,iBAAoC;IAC3E,OAAO,4BAA4B,CAAC,iBAAiB,CAAC,CAAC;AAC3D,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,iBAAoC;IAC9D,OAAO,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,iCAAiC,CAAC,iBAAoC;IAClF,OAAO,mCAAmC,CAAC,iBAAiB,CAAC,CAAC;AAClE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,yCAAyC,CAAC,iBAAoC;IAC1F,OAAO,2CAA2C,CAAC,iBAAiB,CAAC,CAAC;AAC1E,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,sCAAsC,CAAC,iBAAoC;IACvF,OAAO,wCAAwC,CAAC,iBAAiB,CAAC,CAAC;AACvE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,6BAA6B,CAAC,iBAAoC;IAC9E,OAAO,+BAA+B,CAAC,iBAAiB,CAAC,CAAC;AAC9D,CAAC"}
@@ -1,27 +0,0 @@
1
- import type { ContentCharacterSet } from "./content-character-set.js";
2
- import type { IdentifierType } from "./identifier-type.js";
3
- import type { PrefixType } from "./prefix-type.js";
4
- /**
5
- * Identifier descriptor. Instantiations of this type are used to parameterize validators and creators.
6
- */
7
- export interface IdentifierDescriptor {
8
- /**
9
- * Identifier type. Per the GS1 General Specifications, the identifier type determines the remaining properties.
10
- */
11
- readonly identifierType: IdentifierType;
12
- /**
13
- * Prefix type supported by the identifier type. For all identifier types except the GTIN, this is a GS1 Company
14
- * Prefix. For the GTIN, the prefix type determines the length.
15
- */
16
- readonly prefixType: PrefixType;
17
- /**
18
- * Length. For numeric identifier types, the length is fixed; for non-numeric identifier types, the length is the
19
- * maximum.
20
- */
21
- readonly length: number;
22
- /**
23
- * Reference character set.
24
- */
25
- readonly referenceCharacterSet: ContentCharacterSet;
26
- }
27
- //# sourceMappingURL=identifier-descriptor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identifier-descriptor.d.ts","sourceRoot":"","sources":["../src/identifier-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAExC;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAEhC;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,mBAAmB,CAAC;CACvD"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=identifier-descriptor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identifier-descriptor.js","sourceRoot":"","sources":["../src/identifier-descriptor.ts"],"names":[],"mappings":""}
@@ -1,106 +0,0 @@
1
- import type { GTINDescriptor } from "./gtin-descriptor.js";
2
- import { type GTINBaseLength } from "./gtin-length.js";
3
- import type { GTINType } from "./gtin-type.js";
4
- import type { IdentifierDescriptor } from "./identifier-descriptor.js";
5
- import { type IdentifierTypeExtension } from "./identifier-extension.js";
6
- import { type IdentifierType } from "./identifier-type.js";
7
- import type { NonGTINNumericIdentifierDescriptor } from "./non-gtin-numeric-identifier-descriptor.js";
8
- import type { NonNumericIdentifierDescriptor } from "./non-numeric-identifier-descriptor.js";
9
- import type { NonSerializableNumericIdentifierDescriptor } from "./non-serializable-numeric-identifier-descriptor.js";
10
- import type { NumericIdentifierDescriptor } from "./numeric-identifier-descriptor.js";
11
- import type { SerializableNumericIdentifierDescriptor } from "./serializable-numeric-identifier-descriptor.js";
12
- /**
13
- * Identifier descriptor type based on identifier type type.
14
- *
15
- * @template TIdentifierType
16
- * Identifier type type.
17
- */
18
- export type IdentifierTypeDescriptor<TIdentifierType extends IdentifierType> = IdentifierTypeExtension<TIdentifierType, IdentifierDescriptor, NumericIdentifierDescriptor, GTINDescriptor, NonGTINNumericIdentifierDescriptor, NonSerializableNumericIdentifierDescriptor, SerializableNumericIdentifierDescriptor, NonNumericIdentifierDescriptor>;
19
- /**
20
- * Identifier descriptors entry type based on identifier type type.
21
- *
22
- * @template TIdentifierType
23
- * Identifier type type.
24
- */
25
- export type IdentifierDescriptorsEntry<TIdentifierType extends IdentifierType> = TIdentifierType extends GTINType ? Readonly<Record<GTINBaseLength, GTINDescriptor>> : IdentifierTypeDescriptor<TIdentifierType>;
26
- /**
27
- * Identifier descriptors record type.
28
- */
29
- export type IdentifierDescriptorsRecord = {
30
- readonly [TIdentifierType in IdentifierType]: IdentifierDescriptorsEntry<TIdentifierType>;
31
- };
32
- /**
33
- * Identifier descriptors for all identifier types.
34
- */
35
- export declare const IdentifierDescriptors: IdentifierDescriptorsRecord;
36
- /**
37
- * Determine if identifier descriptors or descriptor is GTIN descriptors.
38
- *
39
- * @param identifierDescriptorsOrDescriptor
40
- * Identifier descriptors or descriptor.
41
- *
42
- * @returns
43
- * True if GTIN descriptors.
44
- */
45
- export declare function isGTINDescriptors(identifierDescriptorsOrDescriptor: IdentifierDescriptorsEntry<IdentifierType>): identifierDescriptorsOrDescriptor is Readonly<Record<GTINBaseLength, GTINDescriptor>>;
46
- /**
47
- * Determine if identifier descriptor is a numeric identifier descriptor.
48
- *
49
- * @param identifierDescriptor
50
- * Identifier descriptor.
51
- *
52
- * @returns
53
- * True if identifier descriptor is a numeric identifier descriptor.
54
- */
55
- export declare function isNumericIdentifierDescriptor(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is NumericIdentifierDescriptor;
56
- /**
57
- * Determine if identifier descriptor is a GTIN descriptor.
58
- *
59
- * @param identifierDescriptor
60
- * Identifier descriptor.
61
- *
62
- * @returns
63
- * True if identifier descriptor is a GTIN descriptor.
64
- */
65
- export declare function isGTINDescriptor(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is GTINDescriptor;
66
- /**
67
- * Determine if identifier descriptor is a non-GTIN numeric identifier descriptor.
68
- *
69
- * @param identifierDescriptor
70
- * Identifier descriptor.
71
- *
72
- * @returns
73
- * True if identifier descriptor is a non-GTIN numeric identifier descriptor.
74
- */
75
- export declare function isNonGTINNumericIdentifierDescriptor(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is NonGTINNumericIdentifierDescriptor;
76
- /**
77
- * Determine if identifier descriptor is a non-serializable numeric identifier descriptor.
78
- *
79
- * @param identifierDescriptor
80
- * Identifier descriptor.
81
- *
82
- * @returns
83
- * True if identifier descriptor is a non-serializable numeric identifier descriptor.
84
- */
85
- export declare function isNonSerializableNumericIdentifierDescriptor(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is NonSerializableNumericIdentifierDescriptor;
86
- /**
87
- * Determine if identifier descriptor is a serializable numeric identifier descriptor.
88
- *
89
- * @param identifierDescriptor
90
- * Identifier descriptor.
91
- *
92
- * @returns
93
- * True if identifier descriptor is a serializable numeric identifier descriptor.
94
- */
95
- export declare function isSerializableNumericIdentifierDescriptor(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is SerializableNumericIdentifierDescriptor;
96
- /**
97
- * Determine if identifier descriptor is a non-numeric identifier descriptor.
98
- *
99
- * @param identifierDescriptor
100
- * Identifier descriptor.
101
- *
102
- * @returns
103
- * True if identifier descriptor is a non-numeric identifier descriptor.
104
- */
105
- export declare function isNonNumericIdentifierDescriptor(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is NonNumericIdentifierDescriptor;
106
- //# sourceMappingURL=identifier-descriptors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identifier-descriptors.d.ts","sourceRoot":"","sources":["../src/identifier-descriptors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,KAAK,cAAc,EAAmB,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EACH,KAAK,uBAAuB,EAO/B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,KAAK,cAAc,EAAmB,MAAM,sBAAsB,CAAC;AAE5E,OAAO,KAAK,E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AAc,CAEnH;AAED;;;;;;;;GAQG;AACH,wBAAgB,oCAAoC,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,oBAAoB,IAAI,kCAAkC,CAE3J;AAED;;;;;;;;GAQG;AACH,wBAAgB,4CAA4C,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,oBAAoB,IAAI,0CAA0C,CAE3K;AAED;;;;;;;;GAQG;AACH,wBAAgB,yCAAyC,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,oBAAoB,IAAI,uCAAuC,CAErK;AAED;;;;;;;;GAQG;AACH,wBAAgB,gCAAgC,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,oBAAoB,IAAI,8BAA8B,CAEnJ"}
@@ -1,262 +0,0 @@
1
- import { ContentCharacterSets } from "./content-character-set.js";
2
- import { GTINBaseLengths } from "./gtin-length.js";
3
- import { isGTINExtension, isNonGTINNumericIdentifierExtension, isNonNumericIdentifierExtension, isNonSerializableNumericIdentifierExtension, isNumericIdentifierExtension, isSerializableNumericIdentifierExtension } from "./identifier-extension.js";
4
- import { IdentifierTypes } from "./identifier-type.js";
5
- import { LeaderTypes } from "./leader-type.js";
6
- import { PrefixTypes } from "./prefix-type.js";
7
- /**
8
- * GTIN-13 descriptor.
9
- */
10
- const GTIN13_DESCRIPTOR = {
11
- identifierType: IdentifierTypes.GTIN,
12
- prefixType: PrefixTypes.GS1CompanyPrefix,
13
- length: GTINBaseLengths.GTIN13,
14
- referenceCharacterSet: ContentCharacterSets.Numeric,
15
- leaderType: LeaderTypes.IndicatorDigit
16
- };
17
- /**
18
- * GTIN-12 descriptor.
19
- */
20
- const GTIN12_DESCRIPTOR = {
21
- identifierType: IdentifierTypes.GTIN,
22
- prefixType: PrefixTypes.UPCCompanyPrefix,
23
- length: GTINBaseLengths.GTIN12,
24
- referenceCharacterSet: ContentCharacterSets.Numeric,
25
- leaderType: LeaderTypes.IndicatorDigit
26
- };
27
- /**
28
- * GTIN-8 descriptor.
29
- */
30
- const GTIN8_DESCRIPTOR = {
31
- identifierType: IdentifierTypes.GTIN,
32
- prefixType: PrefixTypes.GS18Prefix,
33
- length: GTINBaseLengths.GTIN8,
34
- referenceCharacterSet: ContentCharacterSets.Numeric,
35
- leaderType: LeaderTypes.IndicatorDigit
36
- };
37
- /**
38
- * GTIN descriptors indexed by prefix type.
39
- */
40
- const GTIN_DESCRIPTORS = {
41
- [GTINBaseLengths.GTIN13]: GTIN13_DESCRIPTOR,
42
- [GTINBaseLengths.GTIN12]: GTIN12_DESCRIPTOR,
43
- [GTINBaseLengths.GTIN8]: GTIN8_DESCRIPTOR
44
- };
45
- /**
46
- * GLN descriptor.
47
- */
48
- const GLN_DESCRIPTOR = {
49
- identifierType: IdentifierTypes.GLN,
50
- prefixType: PrefixTypes.GS1CompanyPrefix,
51
- length: 13,
52
- referenceCharacterSet: ContentCharacterSets.Numeric,
53
- leaderType: LeaderTypes.None
54
- };
55
- /**
56
- * SSCC descriptor.
57
- */
58
- const SSCC_DESCRIPTOR = {
59
- identifierType: IdentifierTypes.SSCC,
60
- prefixType: PrefixTypes.GS1CompanyPrefix,
61
- length: 18,
62
- referenceCharacterSet: ContentCharacterSets.Numeric,
63
- leaderType: LeaderTypes.ExtensionDigit
64
- };
65
- /**
66
- * GRAI descriptor.
67
- */
68
- const GRAI_DESCRIPTOR = {
69
- identifierType: IdentifierTypes.GRAI,
70
- prefixType: PrefixTypes.GS1CompanyPrefix,
71
- length: 13,
72
- referenceCharacterSet: ContentCharacterSets.Numeric,
73
- leaderType: LeaderTypes.None,
74
- serialComponentLength: 16,
75
- serialComponentCharacterSet: ContentCharacterSets.AI82
76
- };
77
- /**
78
- * GIAI descriptor.
79
- */
80
- const GIAI_DESCRIPTOR = {
81
- identifierType: IdentifierTypes.GIAI,
82
- prefixType: PrefixTypes.GS1CompanyPrefix,
83
- length: 30,
84
- referenceCharacterSet: ContentCharacterSets.AI82,
85
- requiresCheckCharacterPair: false
86
- };
87
- /**
88
- * GSRN descriptor.
89
- */
90
- const GSRN_DESCRIPTOR = {
91
- identifierType: IdentifierTypes.GSRN,
92
- prefixType: PrefixTypes.GS1CompanyPrefix,
93
- length: 18,
94
- referenceCharacterSet: ContentCharacterSets.Numeric,
95
- leaderType: LeaderTypes.None
96
- };
97
- /**
98
- * GDTI descriptor.
99
- */
100
- const GDTI_DESCRIPTOR = {
101
- identifierType: IdentifierTypes.GDTI,
102
- prefixType: PrefixTypes.GS1CompanyPrefix,
103
- length: 13,
104
- referenceCharacterSet: ContentCharacterSets.Numeric,
105
- leaderType: LeaderTypes.None,
106
- serialComponentLength: 17,
107
- serialComponentCharacterSet: ContentCharacterSets.AI82
108
- };
109
- /**
110
- * GINC descriptor.
111
- */
112
- const GINC_DESCRIPTOR = {
113
- identifierType: IdentifierTypes.GINC,
114
- prefixType: PrefixTypes.GS1CompanyPrefix,
115
- length: 30,
116
- referenceCharacterSet: ContentCharacterSets.AI82,
117
- requiresCheckCharacterPair: false
118
- };
119
- /**
120
- * GSIN descriptor.
121
- */
122
- const GSIN_DESCRIPTOR = {
123
- identifierType: IdentifierTypes.GSIN,
124
- prefixType: PrefixTypes.GS1CompanyPrefix,
125
- length: 17,
126
- referenceCharacterSet: ContentCharacterSets.Numeric,
127
- leaderType: LeaderTypes.None
128
- };
129
- /**
130
- * GCN descriptor.
131
- */
132
- const GCN_DESCRIPTOR = {
133
- identifierType: IdentifierTypes.GCN,
134
- prefixType: PrefixTypes.GS1CompanyPrefix,
135
- length: 13,
136
- referenceCharacterSet: ContentCharacterSets.Numeric,
137
- leaderType: LeaderTypes.None,
138
- serialComponentLength: 12,
139
- serialComponentCharacterSet: ContentCharacterSets.Numeric
140
- };
141
- /**
142
- * CPID descriptor.
143
- */
144
- const CPID_DESCRIPTOR = {
145
- identifierType: IdentifierTypes.CPID,
146
- prefixType: PrefixTypes.GS1CompanyPrefix,
147
- length: 30,
148
- referenceCharacterSet: ContentCharacterSets.AI39,
149
- requiresCheckCharacterPair: false
150
- };
151
- /**
152
- * GMN descriptor.
153
- */
154
- const GMN_DESCRIPTOR = {
155
- identifierType: IdentifierTypes.GMN,
156
- prefixType: PrefixTypes.GS1CompanyPrefix,
157
- length: 25,
158
- referenceCharacterSet: ContentCharacterSets.AI82,
159
- requiresCheckCharacterPair: true
160
- };
161
- /**
162
- * Identifier descriptors for all identifier types.
163
- */
164
- export const IdentifierDescriptors = {
165
- [IdentifierTypes.GTIN]: GTIN_DESCRIPTORS,
166
- [IdentifierTypes.GLN]: GLN_DESCRIPTOR,
167
- [IdentifierTypes.SSCC]: SSCC_DESCRIPTOR,
168
- [IdentifierTypes.GRAI]: GRAI_DESCRIPTOR,
169
- [IdentifierTypes.GIAI]: GIAI_DESCRIPTOR,
170
- [IdentifierTypes.GSRN]: GSRN_DESCRIPTOR,
171
- [IdentifierTypes.GDTI]: GDTI_DESCRIPTOR,
172
- [IdentifierTypes.GINC]: GINC_DESCRIPTOR,
173
- [IdentifierTypes.GSIN]: GSIN_DESCRIPTOR,
174
- [IdentifierTypes.GCN]: GCN_DESCRIPTOR,
175
- [IdentifierTypes.CPID]: CPID_DESCRIPTOR,
176
- [IdentifierTypes.GMN]: GMN_DESCRIPTOR
177
- };
178
- /**
179
- * Determine if identifier descriptors or descriptor is GTIN descriptors.
180
- *
181
- * @param identifierDescriptorsOrDescriptor
182
- * Identifier descriptors or descriptor.
183
- *
184
- * @returns
185
- * True if GTIN descriptors.
186
- */
187
- export function isGTINDescriptors(identifierDescriptorsOrDescriptor) {
188
- return !("identifierType" in identifierDescriptorsOrDescriptor);
189
- }
190
- /**
191
- * Determine if identifier descriptor is a numeric identifier descriptor.
192
- *
193
- * @param identifierDescriptor
194
- * Identifier descriptor.
195
- *
196
- * @returns
197
- * True if identifier descriptor is a numeric identifier descriptor.
198
- */
199
- export function isNumericIdentifierDescriptor(identifierDescriptor) {
200
- return isNumericIdentifierExtension(identifierDescriptor);
201
- }
202
- /**
203
- * Determine if identifier descriptor is a GTIN descriptor.
204
- *
205
- * @param identifierDescriptor
206
- * Identifier descriptor.
207
- *
208
- * @returns
209
- * True if identifier descriptor is a GTIN descriptor.
210
- */
211
- export function isGTINDescriptor(identifierDescriptor) {
212
- return isGTINExtension(identifierDescriptor);
213
- }
214
- /**
215
- * Determine if identifier descriptor is a non-GTIN numeric identifier descriptor.
216
- *
217
- * @param identifierDescriptor
218
- * Identifier descriptor.
219
- *
220
- * @returns
221
- * True if identifier descriptor is a non-GTIN numeric identifier descriptor.
222
- */
223
- export function isNonGTINNumericIdentifierDescriptor(identifierDescriptor) {
224
- return isNonGTINNumericIdentifierExtension(identifierDescriptor);
225
- }
226
- /**
227
- * Determine if identifier descriptor is a non-serializable numeric identifier descriptor.
228
- *
229
- * @param identifierDescriptor
230
- * Identifier descriptor.
231
- *
232
- * @returns
233
- * True if identifier descriptor is a non-serializable numeric identifier descriptor.
234
- */
235
- export function isNonSerializableNumericIdentifierDescriptor(identifierDescriptor) {
236
- return isNonSerializableNumericIdentifierExtension(identifierDescriptor);
237
- }
238
- /**
239
- * Determine if identifier descriptor is a serializable numeric identifier descriptor.
240
- *
241
- * @param identifierDescriptor
242
- * Identifier descriptor.
243
- *
244
- * @returns
245
- * True if identifier descriptor is a serializable numeric identifier descriptor.
246
- */
247
- export function isSerializableNumericIdentifierDescriptor(identifierDescriptor) {
248
- return isSerializableNumericIdentifierExtension(identifierDescriptor);
249
- }
250
- /**
251
- * Determine if identifier descriptor is a non-numeric identifier descriptor.
252
- *
253
- * @param identifierDescriptor
254
- * Identifier descriptor.
255
- *
256
- * @returns
257
- * True if identifier descriptor is a non-numeric identifier descriptor.
258
- */
259
- export function isNonNumericIdentifierDescriptor(identifierDescriptor) {
260
- return isNonNumericIdentifierExtension(identifierDescriptor);
261
- }
262
- //# sourceMappingURL=identifier-descriptors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identifier-descriptors.js","sourceRoot":"","sources":["../src/identifier-descriptors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;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