inferred-types 0.55.5 → 0.55.6

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.
@@ -138,6 +138,7 @@ __export(index_exports, {
138
138
  isAccelerationUom: () => isAccelerationUom,
139
139
  isAlpha: () => isAlpha,
140
140
  isAmazonUrl: () => isAmazonUrl,
141
+ isAmericanExpress: () => isAmericanExpress,
141
142
  isApi: () => isApi,
142
143
  isApiSurface: () => isApiSurface,
143
144
  isAppleUrl: () => isAppleUrl,
@@ -165,6 +166,7 @@ __export(index_exports, {
165
166
  isCountryCode2: () => isCountryCode2,
166
167
  isCountryCode3: () => isCountryCode3,
167
168
  isCountryName: () => isCountryName,
169
+ isCreditCard: () => isCreditCard,
168
170
  isCssAspectRatio: () => isCssAspectRatio,
169
171
  isCsv: () => isCsv,
170
172
  isCurrentMetric: () => isCurrentMetric,
@@ -353,6 +355,7 @@ __export(index_exports, {
353
355
  isUsStateAbbreviation: () => isUsStateAbbreviation,
354
356
  isUsStateName: () => isUsStateName,
355
357
  isVariable: () => isVariable,
358
+ isVisaMastercard: () => isVisaMastercard,
356
359
  isVoltageMetric: () => isVoltageMetric,
357
360
  isVoltageUom: () => isVoltageUom,
358
361
  isVolumeMetric: () => isVolumeMetric,
@@ -4694,6 +4697,27 @@ function isYesterday(test) {
4694
4697
  return false;
4695
4698
  }
4696
4699
 
4700
+ // src/type-guards/finance/CreditCards.ts
4701
+ function isVisaMastercard(val) {
4702
+ if (isString(val)) {
4703
+ const parts = val.split(" ");
4704
+ return parts.length === 4 && parts.every((i) => isNumberLike(i) && i.length === 4);
4705
+ }
4706
+ return false;
4707
+ }
4708
+ function isAmericanExpress(val) {
4709
+ if (isString(val)) {
4710
+ const parts = val.split(" ");
4711
+ return parts.length === 3 && parts.every(
4712
+ (i) => isNumberLike(i) && parts[0].length === 4 && parts[1].length === 6
4713
+ );
4714
+ }
4715
+ return false;
4716
+ }
4717
+ function isCreditCard(val) {
4718
+ return isVisaMastercard(val) || isAmericanExpress(val);
4719
+ }
4720
+
4697
4721
  // src/type-guards/isString.ts
4698
4722
  function isString(value) {
4699
4723
  return typeof value === "string";
@@ -6170,6 +6194,7 @@ function asVueRef(value) {
6170
6194
  isAccelerationUom,
6171
6195
  isAlpha,
6172
6196
  isAmazonUrl,
6197
+ isAmericanExpress,
6173
6198
  isApi,
6174
6199
  isApiSurface,
6175
6200
  isAppleUrl,
@@ -6197,6 +6222,7 @@ function asVueRef(value) {
6197
6222
  isCountryCode2,
6198
6223
  isCountryCode3,
6199
6224
  isCountryName,
6225
+ isCreditCard,
6200
6226
  isCssAspectRatio,
6201
6227
  isCsv,
6202
6228
  isCurrentMetric,
@@ -6385,6 +6411,7 @@ function asVueRef(value) {
6385
6411
  isUsStateAbbreviation,
6386
6412
  isUsStateName,
6387
6413
  isVariable,
6414
+ isVisaMastercard,
6388
6415
  isVoltageMetric,
6389
6416
  isVoltageUom,
6390
6417
  isVolumeMetric,