@dereekb/util 9.15.0 → 9.15.2

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [9.15.2](https://github.com/dereekb/dbx-components/compare/v9.15.1-dev...v9.15.2) (2022-11-12)
6
+
7
+
8
+
9
+ ## [9.15.1](https://github.com/dereekb/dbx-components/compare/v9.15.0-dev...v9.15.1) (2022-11-11)
10
+
11
+
12
+
5
13
  # [9.15.0](https://github.com/dereekb/dbx-components/compare/v9.14.2-dev...v9.15.0) (2022-11-10)
6
14
 
7
15
 
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [9.15.2](https://github.com/dereekb/dbx-components/compare/v9.15.1-dev...v9.15.2) (2022-11-12)
6
+
7
+
8
+
9
+ ## [9.15.1](https://github.com/dereekb/dbx-components/compare/v9.15.0-dev...v9.15.1) (2022-11-11)
10
+
11
+
12
+
5
13
  # [9.15.0](https://github.com/dereekb/dbx-components/compare/v9.14.2-dev...v9.15.0) (2022-11-10)
6
14
 
7
15
 
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dereekb/util/fetch",
3
- "version": "9.15.0",
3
+ "version": "9.15.2",
4
4
  "main": "./src/index.js",
5
5
  "typings": "./src/index.d.ts",
6
6
  "dependencies": {},
7
7
  "peerDependencies": {
8
- "@dereekb/util": "9.15.0",
8
+ "@dereekb/util": "9.15.2",
9
9
  "lodash.isequal": "^4.5.0",
10
10
  "make-error": "^1.3.0",
11
11
  "class-validator": "^0.13.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/util",
3
- "version": "9.15.0",
3
+ "version": "9.15.2",
4
4
  "type": "commonjs",
5
5
  "exports": {
6
6
  ".": {
@@ -0,0 +1,45 @@
1
+ /**
2
+ * City name
3
+ */
4
+ export declare type CityString = string;
5
+ /**
6
+ * Full state name
7
+ */
8
+ export declare type StateString = string;
9
+ /**
10
+ * State code
11
+ */
12
+ export declare type StateCodeString = string;
13
+ /**
14
+ * Full country name
15
+ */
16
+ export declare type CountryString = string;
17
+ /**
18
+ * Country code
19
+ */
20
+ export declare type CountryCodeString = string;
21
+ export declare type AddressLineString = string;
22
+ export declare type ZipCodeString = string;
23
+ /**
24
+ * Basic US Address that has 2 lines, a city, state, and zip code.
25
+ */
26
+ export interface UnitedStatesAddress {
27
+ line1: AddressLineString;
28
+ line2?: AddressLineString;
29
+ city: CityString;
30
+ state: StateString | StateCodeString;
31
+ zip: ZipCodeString;
32
+ }
33
+ /**
34
+ * Regex expression for all US states and territories.
35
+ */
36
+ export declare const US_STATE_CODE_STRING_REGEX: RegExp;
37
+ export declare function isUsStateCodeString(input: string): boolean;
38
+ /**
39
+ * Simple regex expression for zip codes.
40
+ *
41
+ * Credit to:
42
+ *
43
+ * https://stackoverflow.com/a/19844362
44
+ */
45
+ export declare const ZIP_CODE_STRING_REGEX: RegExp;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZIP_CODE_STRING_REGEX = exports.isUsStateCodeString = exports.US_STATE_CODE_STRING_REGEX = void 0;
4
+ /**
5
+ * Regex expression for all US states and territories.
6
+ */
7
+ exports.US_STATE_CODE_STRING_REGEX = /^((A[LKSZR])|(C[AOT])|(D[EC])|(F[ML])|(G[AU])|(HI)|(I[DLNA])|(K[SY])|(LA)|(M[EHDAINSOT])|(N[EVHJMYCD])|(MP)|(O[HKR])|(P[WAR])|(RI)|(S[CD])|(T[NX])|(UT)|(V[TIA])|(W[AVIY]))$/;
8
+ function isUsStateCodeString(input) {
9
+ return exports.US_STATE_CODE_STRING_REGEX.test(input);
10
+ }
11
+ exports.isUsStateCodeString = isUsStateCodeString;
12
+ /**
13
+ * Simple regex expression for zip codes.
14
+ *
15
+ * Credit to:
16
+ *
17
+ * https://stackoverflow.com/a/19844362
18
+ */
19
+ exports.ZIP_CODE_STRING_REGEX = /^[a-z0-9][a-z0-9\- ]{0,10}[a-z0-9]$/;
20
+ //# sourceMappingURL=address.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.js","sourceRoot":"","sources":["../../../../../../packages/util/src/lib/value/address.ts"],"names":[],"mappings":";;;AAuCA;;GAEG;AACU,QAAA,0BAA0B,GAAG,8KAA8K,CAAC;AAEzN,SAAgB,mBAAmB,CAAC,KAAa;IAC/C,OAAO,kCAA0B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAFD,kDAEC;AAED;;;;;;GAMG;AACU,QAAA,qBAAqB,GAAG,qCAAqC,CAAC"}
@@ -1,3 +1,4 @@
1
+ export * from './address';
1
2
  export * from './bound';
2
3
  export * from './build';
3
4
  export * from './cron';
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./address"), exports);
4
5
  tslib_1.__exportStar(require("./bound"), exports);
5
6
  tslib_1.__exportStar(require("./build"), exports);
6
7
  tslib_1.__exportStar(require("./cron"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/util/src/lib/value/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,kDAAwB;AACxB,iDAAuB;AACvB,qDAA2B;AAC3B,kDAAwB;AACxB,oDAA0B;AAC1B,gDAAsB;AACtB,uDAA6B;AAC7B,kDAAwB;AACxB,qDAA2B;AAC3B,kDAAwB;AACxB,gDAAsB;AACtB,gDAAsB;AACtB,kDAAwB;AACxB,mDAAyB;AACzB,iDAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/util/src/lib/value/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,kDAAwB;AACxB,kDAAwB;AACxB,iDAAuB;AACvB,qDAA2B;AAC3B,kDAAwB;AACxB,oDAA0B;AAC1B,gDAAsB;AACtB,uDAA6B;AAC7B,kDAAwB;AACxB,qDAA2B;AAC3B,kDAAwB;AACxB,gDAAsB;AACtB,gDAAsB;AACtB,kDAAwB;AACxB,mDAAyB;AACzB,iDAAuB"}
package/test/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [9.15.2](https://github.com/dereekb/dbx-components/compare/v9.15.1-dev...v9.15.2) (2022-11-12)
6
+
7
+
8
+
9
+ ## [9.15.1](https://github.com/dereekb/dbx-components/compare/v9.15.0-dev...v9.15.1) (2022-11-11)
10
+
11
+
12
+
5
13
  # [9.15.0](https://github.com/dereekb/dbx-components/compare/v9.14.2-dev...v9.15.0) (2022-11-10)
6
14
 
7
15
 
package/test/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dereekb/util/test",
3
- "version": "9.15.0",
3
+ "version": "9.15.2",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./src/index.d.ts",
7
7
  "dependencies": {},
8
8
  "peerDependencies": {
9
- "@dereekb/util": "9.15.0",
9
+ "@dereekb/util": "9.15.2",
10
10
  "lodash.isequal": "^4.5.0",
11
11
  "make-error": "^1.3.0",
12
12
  "class-validator": "^0.13.2",