@evervault/react-native 2.6.2 → 2.6.3

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.
@@ -6,7 +6,7 @@ function g(e) {
6
6
  l = parseInt(e.charAt(s), 10), t && (l *= 2, l > 9 && (l = l % 10 + 1)), t = !t, n += l, s--;
7
7
  return n % 10 === 0;
8
8
  }
9
- const h = [
9
+ const c = [
10
10
  {
11
11
  name: "visa",
12
12
  isLocal: false,
@@ -282,7 +282,7 @@ function C(e) {
282
282
  lastFour: null,
283
283
  isValid: false
284
284
  };
285
- const t = h.filter((i) => i.numberValidationRules.ranges.some((r) => {
285
+ const t = c.filter((i) => i.numberValidationRules.ranges.some((r) => {
286
286
  if (Array.isArray(r)) {
287
287
  if (r[0] && r[1])
288
288
  return m(n, r[0], r[1]);
@@ -290,8 +290,8 @@ function C(e) {
290
290
  return V(n, r);
291
291
  return false;
292
292
  })), s = t.filter((i) => !i.isLocal), l = t.filter((i) => i.isLocal), a = t.length > 0 && t.every((i) => {
293
- const { lengths: r, luhnCheck: o } = i.numberValidationRules, c = r.includes(n.length), d = !o || g(n);
294
- return c && d;
293
+ const { lengths: r, luhnCheck: o } = i.numberValidationRules, h = r.includes(n.length), d = !o || g(n);
294
+ return h && d;
295
295
  }), u = e.length > 5;
296
296
  return {
297
297
  brand: s.length > 0 ? s[0].name : null,
@@ -320,21 +320,20 @@ function R(e, n) {
320
320
  };
321
321
  const s = [];
322
322
  t.brand && s.push(t.brand), t.localBrands && s.push(...t.localBrands);
323
- const l = h.filter((a) => s.includes(a.name)).some((a) => a.securityCodeValidationRules.lengths.includes(e.length));
323
+ const l = c.filter((a) => s.includes(a.name)).some((a) => a.securityCodeValidationRules.lengths.includes(e.length));
324
324
  return {
325
325
  cvc: l ? e : null,
326
326
  isValid: l
327
327
  };
328
328
  }
329
329
  function b(e) {
330
- var i;
331
330
  const n = /^(0[1-9]|1[[0-2]).*$/, t = e.match(n), s = t ? parseInt(t[1].toString(), 10) : null, l = /^(0[1-9]|1[[0-2])(\d{2})$/, a = e.match(l), u = a ? parseInt(a[2].toString(), 10) : null;
332
331
  if (s) {
333
- const r = (/* @__PURE__ */ new Date()).getFullYear() % 100, o = (/* @__PURE__ */ new Date()).getMonth() + 1, c = !u || u < r || u === r && s < o;
332
+ const i = (/* @__PURE__ */ new Date()).getFullYear() % 100, r = (/* @__PURE__ */ new Date()).getMonth() + 1, o = !u || u < i || u === i && s < r;
334
333
  return {
335
334
  month: s.toString().padStart(2, "0"),
336
- year: ((i = u == null ? void 0 : u.toString()) == null ? void 0 : i.padStart(2, "0")) ?? null,
337
- isValid: !c
335
+ year: u?.toString()?.padStart(2, "0") ?? null,
336
+ isValid: !o
338
337
  };
339
338
  }
340
339
  return {
@@ -1,2 +1,2 @@
1
- export declare const EV_API_DOMAIN: string;
2
- export declare const CHALLENGE_DOMAIN_3DS: string;
1
+ export declare const EV_API_DOMAIN: any;
2
+ export declare const CHALLENGE_DOMAIN_3DS: any;
@@ -4,7 +4,7 @@ function g(e) {
4
4
  l = parseInt(e.charAt(s), 10), t && (l *= 2, l > 9 && (l = l % 10 + 1)), t = !t, n += l, s--;
5
5
  return n % 10 === 0;
6
6
  }
7
- const h = [
7
+ const c = [
8
8
  {
9
9
  name: "visa",
10
10
  isLocal: false,
@@ -280,7 +280,7 @@ function C(e) {
280
280
  lastFour: null,
281
281
  isValid: false
282
282
  };
283
- const t = h.filter((i) => i.numberValidationRules.ranges.some((r) => {
283
+ const t = c.filter((i) => i.numberValidationRules.ranges.some((r) => {
284
284
  if (Array.isArray(r)) {
285
285
  if (r[0] && r[1])
286
286
  return m(n, r[0], r[1]);
@@ -288,8 +288,8 @@ function C(e) {
288
288
  return V(n, r);
289
289
  return false;
290
290
  })), s = t.filter((i) => !i.isLocal), l = t.filter((i) => i.isLocal), a = t.length > 0 && t.every((i) => {
291
- const { lengths: r, luhnCheck: o } = i.numberValidationRules, c = r.includes(n.length), d = !o || g(n);
292
- return c && d;
291
+ const { lengths: r, luhnCheck: o } = i.numberValidationRules, h = r.includes(n.length), d = !o || g(n);
292
+ return h && d;
293
293
  }), u = e.length > 5;
294
294
  return {
295
295
  brand: s.length > 0 ? s[0].name : null,
@@ -318,21 +318,20 @@ function R(e, n) {
318
318
  };
319
319
  const s = [];
320
320
  t.brand && s.push(t.brand), t.localBrands && s.push(...t.localBrands);
321
- const l = h.filter((a) => s.includes(a.name)).some((a) => a.securityCodeValidationRules.lengths.includes(e.length));
321
+ const l = c.filter((a) => s.includes(a.name)).some((a) => a.securityCodeValidationRules.lengths.includes(e.length));
322
322
  return {
323
323
  cvc: l ? e : null,
324
324
  isValid: l
325
325
  };
326
326
  }
327
327
  function b(e) {
328
- var i;
329
328
  const n = /^(0[1-9]|1[[0-2]).*$/, t = e.match(n), s = t ? parseInt(t[1].toString(), 10) : null, l = /^(0[1-9]|1[[0-2])(\d{2})$/, a = e.match(l), u = a ? parseInt(a[2].toString(), 10) : null;
330
329
  if (s) {
331
- const r = (/* @__PURE__ */ new Date()).getFullYear() % 100, o = (/* @__PURE__ */ new Date()).getMonth() + 1, c = !u || u < r || u === r && s < o;
330
+ const i = (/* @__PURE__ */ new Date()).getFullYear() % 100, r = (/* @__PURE__ */ new Date()).getMonth() + 1, o = !u || u < i || u === i && s < r;
332
331
  return {
333
332
  month: s.toString().padStart(2, "0"),
334
- year: ((i = u == null ? void 0 : u.toString()) == null ? void 0 : i.padStart(2, "0")) ?? null,
335
- isValid: !c
333
+ year: u?.toString()?.padStart(2, "0") ?? null,
334
+ isValid: !o
336
335
  };
337
336
  }
338
337
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@evervault/react-native",
3
3
  "description": "Evervault SDK for React Native",
4
- "version": "2.6.2",
4
+ "version": "2.6.3",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./build/cjs/index.js",
7
7
  "module": "./build/esm/index.js",
@@ -45,7 +45,7 @@
45
45
  "react-test-renderer": "18.2.0",
46
46
  "rimraf": "^6.0.1",
47
47
  "rollup": "^4.34.9",
48
- "vitest": "^2.1.8",
48
+ "vitest": "^4.0.18",
49
49
  "vitest-react-native": "^0.1.5",
50
50
  "tsconfig": "0.1.0"
51
51
  },