typeshi 1.4.0 → 1.6.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * @file src/config/index.ts
3
3
  */
4
- export * from "./setupLog";
5
4
  export * from "./env";
5
+ export * from "./setupLog";
@@ -17,5 +17,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
17
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- __exportStar(require("./setupLog"), exports);
21
20
  __exportStar(require("./env"), exports);
21
+ __exportStar(require("./setupLog"), exports);
package/dist/index.d.ts CHANGED
@@ -1,8 +1,5 @@
1
1
  /**
2
2
  * @file src/index.ts
3
3
  */
4
- export * as re from "./utils/regex";
5
- export * as io from "./utils/io";
6
- export * as config from "./config";
7
- export * as TypeValidation from "./utils/typeValidation";
8
- export * as ArgumentValidation from "./utils/argumentValidation";
4
+ export * from "./config";
5
+ export * from "./utils";
package/dist/index.js CHANGED
@@ -13,32 +13,9 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
13
13
  if (k2 === undefined) k2 = k;
14
14
  o[k2] = m[k];
15
15
  }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
16
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
+ };
38
19
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.ArgumentValidation = exports.TypeValidation = exports.config = exports.io = exports.re = void 0;
40
- exports.re = __importStar(require("./utils/regex"));
41
- exports.io = __importStar(require("./utils/io"));
42
- exports.config = __importStar(require("./config"));
43
- exports.TypeValidation = __importStar(require("./utils/typeValidation"));
44
- exports.ArgumentValidation = __importStar(require("./utils/argumentValidation"));
20
+ __exportStar(require("./config"), exports);
21
+ __exportStar(require("./utils"), exports);
@@ -1,19 +1,3 @@
1
- /**
2
- * @file src/utils/argumentValidation.ts
3
- * @description moved the content of parameter type checks at the start of
4
- * functions to here. use these when you want your function to throw a fit when
5
- * it receives bad input.
6
- * @example
7
- * import * as validate from "@typeshi/argumentValidation";
8
- * @TODO add boolean value configurable by a setter function that specifies if errors should be thrown or only logged
9
- * - maybe add a configurable value that the validation functions should return if the validation test fails
10
- * - change the validation functions such that they return the validated value, if possible?
11
- * - or maybe have them return boolean type predicates ?
12
- * - -> maybe have to make a class
13
- * - research the thingy where a type is after the function name and before parens
14
- * @consideration add a default export named 'validate'
15
- */
16
- import { TypeOfEnum } from "./typeValidation";
17
1
  /**
18
2
  * - {@link isNonEmptyString}`(value: any): value is string & { length: number; }`
19
3
  * @param source `string` indicating what called `stringArgument()`
@@ -93,8 +77,8 @@ export declare function functionArgument(source: string, arg2: string | {
93
77
  * @param label `string` the argument/parameter name
94
78
  * @param value `any` the value passed into the `source`
95
79
  * for the argument corresponding to `label`
96
- * @param elementType `TypeOfEnum | string` `(optional)`, the expected type of each element in the array
97
- * - `if` provided, must be one of the values in {@link TypeOfEnum} or a string representing the type
80
+ * @param elementType `string` `(optional)`, the expected type of each element in the array
81
+ * - `if` provided, must be a string representing the type
98
82
  * @param elementTypeGuard `(value: any) => boolean` `(optional)`, a type guard function that checks if each element in the array is of a specific type
99
83
  * - `if` provided, must be a function that takes a value and returns a boolean indicating if the value is of the expected type
100
84
  * - `if` both `elementType` and `elementTypeGuard` are provided, both must be satisfied
@@ -107,7 +91,7 @@ export declare function functionArgument(source: string, arg2: string | {
107
91
  * - `Expected '${label}' to be: non-empty array`
108
92
  * - `Received '${label}' value: ${typeof value} = '${value}'`
109
93
  */
110
- export declare function arrayArgument(source: string, label: string, value: any, elementType?: TypeOfEnum | string, elementTypeGuard?: (value: any) => boolean, allowEmpty?: boolean): void;
94
+ export declare function arrayArgument(source: string, label: string, value: any, elementType?: string, elementTypeGuard?: (value: any) => boolean, allowEmpty?: boolean): void;
111
95
  /**
112
96
  * @note `if` `elementTypeGuard`'s name or its label includes 'Array' then only check `elementTypeGuard(value)`
113
97
  * instead of checking `value.every(el => elementTypeGuard(el))`
@@ -192,4 +176,19 @@ export declare function existingPathArgument(source: string, arg2: string | {
192
176
  * @returns **`bracketedString`** `string`
193
177
  */
194
178
  export declare const bracketed: (s: string) => string;
195
- export {};
179
+ declare const validate: {
180
+ stringArgument: typeof stringArgument;
181
+ multipleStringArguments: typeof multipleStringArguments;
182
+ numericStringArgument: typeof numericStringArgument;
183
+ booleanArgument: typeof booleanArgument;
184
+ numberArgument: typeof numberArgument;
185
+ arrayArgument: typeof arrayArgument;
186
+ enumArgument: typeof enumArgument;
187
+ objectArgument: typeof objectArgument;
188
+ functionArgument: typeof functionArgument;
189
+ existingPathArgument: typeof existingPathArgument;
190
+ existingDirectoryArgument: typeof existingDirectoryArgument;
191
+ existingFileArgument: typeof existingFileArgument;
192
+ multipleExistingFileArguments: typeof multipleExistingFileArguments;
193
+ };
194
+ export default validate;
@@ -63,7 +63,6 @@ exports.existingPathArgument = existingPathArgument;
63
63
  * - or maybe have them return boolean type predicates ?
64
64
  * - -> maybe have to make a class
65
65
  * - research the thingy where a type is after the function name and before parens
66
- * @consideration add a default export named 'validate'
67
66
  */
68
67
  const typeValidation_1 = require("./typeValidation");
69
68
  const setupLog_1 = require("../config/setupLog");
@@ -315,6 +314,9 @@ function functionArgument(source, arg2, value) {
315
314
  throw new Error(msg);
316
315
  }
317
316
  }
317
+ /**
318
+ * `re = /(?<=^is).*$/i`
319
+ */
318
320
  const typeGuardNamePattern = /(?<=^is).*$/i;
319
321
  /**
320
322
  * @note `if` `elementTypeGuard`'s name or its label includes 'Array' then only check `elementTypeGuard(value)`
@@ -337,7 +339,7 @@ function arrayArgument(source,
337
339
  arg2,
338
340
  /** `value (any) | allowEmpty (boolean)` */
339
341
  arg3,
340
- /** elementType (TypeOfEnum | string) | undefined */
342
+ /** elementType (string) | undefined */
341
343
  elementType,
342
344
  /** elementTypeGuard | allowEmpty (boolean) */
343
345
  elementTypeGuard, allowEmpty) {
@@ -808,3 +810,22 @@ function getSourceString(fileName, func, funcInfo, startLine, endLine) {
808
810
  let funcName = typeof func === 'string' ? func : func.name;
809
811
  return `[${fileName}.${funcName}(${(0, typeValidation_1.isNonEmptyString)(funcInfo) ? ` ${funcInfo} ` : ''})${lineNumberText}]`;
810
812
  }
813
+ // isEnumArgumentOptions,
814
+ // isEnumObject,
815
+ // isObjectArgumentOptions,
816
+ const validate = {
817
+ stringArgument,
818
+ multipleStringArguments,
819
+ numericStringArgument,
820
+ booleanArgument,
821
+ numberArgument,
822
+ arrayArgument,
823
+ enumArgument,
824
+ objectArgument,
825
+ functionArgument,
826
+ existingPathArgument,
827
+ existingDirectoryArgument,
828
+ existingFileArgument,
829
+ multipleExistingFileArguments
830
+ };
831
+ exports.default = validate;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @file src/utils/index.ts
3
+ */
4
+ export * from "./io";
5
+ export * from "./regex";
6
+ export * from "./argumentValidation";
7
+ export * from "./typeValidation";
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /**
3
+ * @file src/utils/index.ts
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ __exportStar(require("./io"), exports);
21
+ __exportStar(require("./regex"), exports);
22
+ __exportStar(require("./argumentValidation"), exports);
23
+ __exportStar(require("./typeValidation"), exports);
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @file src/utils/io/index.ts
3
3
  */
4
+ export * from "./types";
4
5
  export * from "./dateTime";
6
+ export * from "./logging";
5
7
  export * from "./reading";
6
8
  export * from "./writing";
7
- export * from "./logging";
8
- export * from "./types";
@@ -17,8 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /**
18
18
  * @file src/utils/io/index.ts
19
19
  */
20
+ __exportStar(require("./types"), exports);
20
21
  __exportStar(require("./dateTime"), exports);
22
+ __exportStar(require("./logging"), exports);
21
23
  __exportStar(require("./reading"), exports);
22
24
  __exportStar(require("./writing"), exports);
23
- __exportStar(require("./logging"), exports);
24
- __exportStar(require("./types"), exports);
@@ -1,6 +1,6 @@
1
1
  /** `re` = `/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/` */
2
2
  export declare const EMAIL_REGEX: RegExp;
3
- /**return true if matches {@link EMAIL_REGEX} and does not include substring `'@benev'` */
4
- export declare function isValidEmail(email: string): boolean;
3
+ /**return true if matches {@link EMAIL_REGEX} and does not include pattern/string specified in `excludeSubstrings` */
4
+ export declare function isValidEmail(email: string, excludeSubstrings?: string | RegExp | string[]): boolean;
5
5
  /** @returns **`email`**: `string` - the first email that matches {@link EMAIL_REGEX} or an empty string `''`*/
6
6
  export declare function extractEmail(email: string): RegExpMatchArray | null;
@@ -10,13 +10,13 @@ const stringOperations_1 = require("./stringOperations");
10
10
  const StringOptions_1 = require("./types/StringOptions");
11
11
  /** `re` = `/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/` */
12
12
  exports.EMAIL_REGEX = new RegExp(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/, StringOptions_1.RegExpFlagsEnum.GLOBAL);
13
- /**return true if matches {@link EMAIL_REGEX} and does not include substring `'@benev'` */
14
- function isValidEmail(email) {
13
+ /**return true if matches {@link EMAIL_REGEX} and does not include pattern/string specified in `excludeSubstrings` */
14
+ function isValidEmail(email, excludeSubstrings) {
15
15
  if (!email)
16
16
  return false;
17
17
  email = email.trim();
18
18
  return exports.EMAIL_REGEX.test(email)
19
- && !(0, stringOperations_1.stringContainsAnyOf)(email, /@benev/, StringOptions_1.RegExpFlagsEnum.IGNORE_CASE, StringOptions_1.RegExpFlagsEnum.GLOBAL);
19
+ && (excludeSubstrings ? !(0, stringOperations_1.stringContainsAnyOf)(email, excludeSubstrings) : true);
20
20
  }
21
21
  /** @returns **`email`**: `string` - the first email that matches {@link EMAIL_REGEX} or an empty string `''`*/
22
22
  function extractEmail(email) {
@@ -24,14 +24,8 @@ function extractEmail(email) {
24
24
  return null;
25
25
  email = email.trim();
26
26
  const match = email.match(exports.EMAIL_REGEX);
27
- // DEBUG.push(
28
- // NL + `extractEmail() EMAIL_REGEX.test("${email}") = ${EMAIL_REGEX.test(email)}`,
29
- // TAB + `match=${JSON.stringify(match)}`
30
- // );
31
27
  if (match) {
32
- // DEBUG.push(NL+`-> match not null -> returning ${JSON.stringify(match)}`);
33
28
  return match;
34
29
  }
35
- // DEBUG.push(NL+`-> match is null -> returning null`);
36
30
  return null;
37
31
  }
@@ -167,8 +167,5 @@ function extractJobTitleSuffix(s) {
167
167
  /**
168
168
  * - `re` = `/\b(?:company|corp|inc|co\.?,? ltd\.?|ltd|\.?l\.?lc|plc . . .)\b/` `i`
169
169
  * */
170
- // export const COMPANY_KEYWORDS_PATTERN = new RegExp(
171
- // `\\b(?:` + getCompanyKeywordList().join('|') + `)\\b`, RegExpFlagsEnum.IGNORE_CASE
172
- // );
173
170
  exports.COMPANY_KEYWORDS_PATTERN = /\b(?:compan(y|ies)|[+@&]+|corporation|corporate|(drop)?box|corp|inc|co\.|co\.?,? ltd\.?|ltd|(p\.)?l\.?l\.?c|plc|llp|(un)?limited|nys|oc|mc|pr|local|group|consulting|consultant(s)?|vcc|bcp|center|(in)?pack(aging|age)?|electric|chemical|Exhibit(s)?|business|Factory|employee|print(s|ing)?|Pharmaceutical(s)?|vista ?print|associates|association|account(s)?|art(s)?|AMZ|independent|beauty|beautiful(ly)?|meditech|medaesthetic|partners|Acupuncture|Affiliate(s)?|telecom|maps|cosmetic(s)?|connections|practice|computer|service(s)?|skincare|skin|face|facial|body|artisan(s)?|Alchemy|plastic|advanced|surgical|surgery|surgeons|administrators|laser|practice|scientific|science|health|healthcare|medical|med|med( |i)?spa|spa|SpaMedica|perfect|surgeons|(med)?(a)?esthetic(s|a)?|salon|lounge|studio|wellness|courier|capital|financ(e|ing)|collector|dept(\.)?|HVAC|insurance|ins|surety|freight|fine art|solution(s)?|trad(e|ing)|renewal|department|inst\.|institute|instant|university|college|America(n)?|US(A)?|global|digital|virtual|orange|coast(al)?|tree|franchise|orthopedic(s)?|academy|advertising|travel|technologies|flash|international|tech|clinic(s|al)?|Exterminator|Nightclub|management|foundation|aid|product(ions|ion|s)?|industr(y|ies|ial)|biomed|bio|bio-chem|lubian|technology|technical|special(ist(s)?|ities)?|support|innovat(e|ive|ion(s)?)|county|united|state(s)?|the|one|of|for|by|and|on|or|at|it|the|about|plan|legal|valley|republic|recruit(ing)?|media|southern|office|post office|clean(er|ers)|transport|law|contract|high|food|meal|therapy|therapeutic(s)?|dental|laboratory|instrument|southwest|ingredient(s)?|commerce|city|Laboratories|lab|logistics|newport|radio|video|photo(graphy)?|korea|communication(s)|derm(atology|atologist(s)?)|new|express|goods|mission|depot|treasur(e|er|y)|revenue|biolab|Orders|staff(ing|ed)?|investors|envelope|refresh|Anti|AgingMajestic|motors|museum|event|Kaiser|pacific|visa|platinum|level|Rejuvenation|bespoke|Cardio|speed|pro|tax|firm|DC|square|store|weight|group|Buy|balance(d)?|buckhead|market(s)?|Bulk|perks|GPT|Boutique|supplement(s)?|vitamin(s)?|plus|sales|salesforce|precision|fitness|image|premier|Fulfillment|final|elite|elase|sculpt(ing)?|botox|south|Hills|symposium|wifi|online|worldwide|tv|derm([a-z]+)|wine|rent(al(s)?)?|mail|plumber(s)?|Sociedade|card|\.com)\b/i;
174
171
  exports.COMPANY_ABBREVIATION_PATTERN = /\b(?:corp|inc|co\.?,? ltd\.?|ltd|(p\.)?l\.?l\.?c|p\.?c|plc|llp|s\.c)\.?\s*$/i;
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * @file src/utils/regex/index.ts
3
3
  */
4
- export * from "./configureParameters";
4
+ export * from "./types";
5
5
  export * from "./cleaning";
6
- export * from "./stringOperations";
6
+ export * from "./configureParameters";
7
7
  export * from "./email";
8
- export * from "./phone";
9
- export * from "./misc";
10
8
  export * from "./entity";
11
- export * from "./types";
9
+ export * from "./misc";
10
+ export * from "./phone";
11
+ export * from "./stringOperations";
@@ -17,11 +17,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /**
18
18
  * @file src/utils/regex/index.ts
19
19
  */
20
- __exportStar(require("./configureParameters"), exports);
20
+ __exportStar(require("./types"), exports);
21
21
  __exportStar(require("./cleaning"), exports);
22
- __exportStar(require("./stringOperations"), exports);
22
+ __exportStar(require("./configureParameters"), exports);
23
23
  __exportStar(require("./email"), exports);
24
- __exportStar(require("./phone"), exports);
25
- __exportStar(require("./misc"), exports);
26
24
  __exportStar(require("./entity"), exports);
27
- __exportStar(require("./types"), exports);
25
+ __exportStar(require("./misc"), exports);
26
+ __exportStar(require("./phone"), exports);
27
+ __exportStar(require("./stringOperations"), exports);
@@ -23,15 +23,10 @@ export declare const DATE_STRING_PATTERN: RegExp;
23
23
  /** e.g. `"Pangyo-ro, Bundag-Gu, Seongnam-si"` */
24
24
  export declare const KOREA_ADDRESS_LATIN_TEXT_PATTERN: RegExp;
25
25
  /**
26
- * @consideration `removeClasses` is unnecessary, can assume true if a value for
27
- * classDelimiter is provided -> have to remove default value for classDelimiter
28
26
  * @param value `string` - the string value from which to extract `leaf`
29
- * @param removeClasses `boolean` - remove string prefixes from result `leaf`
30
- * - `Default` = `true`
31
27
  * - e.g. `'CLASSA:SKU-1'` -> `sku` with classes removed = `'SKU-1'`
32
28
  * @param classDelimiter `string` - the character used to delimit the item's classes
33
- * - `Default` = `':'` (colon character)
34
29
  * - e.g. `classDelimiter` of `'CLASSA:SKU-1'` = `':'`
35
30
  * @returns **`leaf`**: `string` - the extracted `leaf` or the original value if no extraction performed
36
31
  */
37
- export declare function extractLeaf(value: string, removeClasses?: boolean, classDelimiter?: string): string;
32
+ export declare function extractLeaf(value: string, classDelimiter: string): string;
@@ -42,34 +42,17 @@ exports.DATE_STRING_PATTERN = new RegExp(/^\s*(\d{4}-\d{2}-\d{2}|\d{1,2}[\/-]\d{
42
42
  /** e.g. `"Pangyo-ro, Bundag-Gu, Seongnam-si"` */
43
43
  exports.KOREA_ADDRESS_LATIN_TEXT_PATTERN = new RegExp(/^\s*([a-zA-Z]{2,}-[a-zA-Z]{2,},\s*){1,}[a-zA-Z]{2,}-[a-zA-Z]{2,}\s*$/);
44
44
  /**
45
- * @consideration `removeClasses` is unnecessary, can assume true if a value for
46
- * classDelimiter is provided -> have to remove default value for classDelimiter
47
45
  * @param value `string` - the string value from which to extract `leaf`
48
- * @param removeClasses `boolean` - remove string prefixes from result `leaf`
49
- * - `Default` = `true`
50
46
  * - e.g. `'CLASSA:SKU-1'` -> `sku` with classes removed = `'SKU-1'`
51
47
  * @param classDelimiter `string` - the character used to delimit the item's classes
52
- * - `Default` = `':'` (colon character)
53
48
  * - e.g. `classDelimiter` of `'CLASSA:SKU-1'` = `':'`
54
49
  * @returns **`leaf`**: `string` - the extracted `leaf` or the original value if no extraction performed
55
50
  */
56
- function extractLeaf(value, removeClasses = true, classDelimiter = ':') {
51
+ function extractLeaf(value, classDelimiter) {
57
52
  let result = value;
58
- if (value.includes(' (')) { // remove description enclosed in parentheses
59
- result = value.split(' (')[0];
60
- // const match = skuValue.match(skuPattern);
61
- // if (isNonEmptyArray(match)) {
62
- // return match[0].trim();
63
- // }
64
- }
65
- if (removeClasses && result.includes(classDelimiter)) {
53
+ if (result.includes(classDelimiter)) {
66
54
  let classifierSplit = result.split(classDelimiter);
67
55
  result = classifierSplit[classifierSplit.length - 1];
68
56
  }
69
- // if (value.includes(':')) {mlog.debug([`[regex.misc.extractLeaf()]`,
70
- // ` initial value: '${value}'`,
71
- // `after removeClasses: '${result}'`,
72
- // ].join(TAB));
73
- // STOP_RUNNING(0)}
74
57
  return result || value;
75
58
  }
@@ -145,19 +145,3 @@ export declare function isObject(value: any, requireNonEmpty?: boolean, requireN
145
145
  * @returns **`isBoolean`** `boolean`
146
146
  */
147
147
  export declare function isBoolean(value: any): value is boolean;
148
- /**
149
- * @TODO deprecate and remove this
150
- * @enum {string} **`TypeOfEnum`**
151
- * @property **`STRING`** = `'string'`
152
- * @property **`NUMBER`** = `'number'`
153
- * @property **`BOOLEAN`** = `'boolean'`
154
- * @property **`OBJECT`** = `'object'`
155
- * @property **`FUNCTION`** = `'function'`
156
- */
157
- export declare enum TypeOfEnum {
158
- STRING = "string",
159
- NUMBER = "number",
160
- BOOLEAN = "boolean",
161
- OBJECT = "object",
162
- FUNCTION = "function"
163
- }
@@ -3,7 +3,7 @@
3
3
  * @file src/utils/typeValidation.ts
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.TypeOfEnum = exports.isEmpty = void 0;
6
+ exports.isEmpty = void 0;
7
7
  exports.isNullLike = isNullLike;
8
8
  exports.anyNull = anyNull;
9
9
  exports.isNonEmptyArray = isNonEmptyArray;
@@ -289,20 +289,3 @@ function isObject(value, requireNonEmpty = true, requireNonArray = true) {
289
289
  function isBoolean(value) {
290
290
  return (typeof value === 'boolean');
291
291
  }
292
- /**
293
- * @TODO deprecate and remove this
294
- * @enum {string} **`TypeOfEnum`**
295
- * @property **`STRING`** = `'string'`
296
- * @property **`NUMBER`** = `'number'`
297
- * @property **`BOOLEAN`** = `'boolean'`
298
- * @property **`OBJECT`** = `'object'`
299
- * @property **`FUNCTION`** = `'function'`
300
- */
301
- var TypeOfEnum;
302
- (function (TypeOfEnum) {
303
- TypeOfEnum["STRING"] = "string";
304
- TypeOfEnum["NUMBER"] = "number";
305
- TypeOfEnum["BOOLEAN"] = "boolean";
306
- TypeOfEnum["OBJECT"] = "object";
307
- TypeOfEnum["FUNCTION"] = "function";
308
- })(TypeOfEnum || (exports.TypeOfEnum = TypeOfEnum = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typeshi",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "TypeScript utility modules",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,25 +23,24 @@
23
23
  ],
24
24
  "author": "Andrew Garwood",
25
25
  "license": "MIT",
26
- "devDependencies": {
27
- "@types/jest": "^29.5.14",
28
- "@types/node": "^22.15.15",
29
- "addresser": "^1.1.20",
30
- "axios": "^1.9.0",
31
- "csv-parser": "^3.2.0",
32
- "fastest-levenshtein": "^1.0.16",
33
- "fs": "^0.0.1-security",
34
- "jest": "^29.7.0",
35
- "lodash": "^4.17.21",
36
- "puppeteer-core": "^24.9.0",
26
+ "dependencies": {
37
27
  "rimraf": "^5.0.0",
38
28
  "ts-jest": "^29.3.4",
39
29
  "ts-node": "^10.9.2",
40
- "tsconfig-paths": "^4.2.0",
41
30
  "tslog": "^4.9.3",
42
- "typescript": "^5.0.0",
31
+ "lodash": "^4.17.21",
32
+ "addresser": "^1.1.20",
33
+ "csv-parser": "^3.2.0",
34
+ "fastest-levenshtein": "^1.0.16",
43
35
  "xlsx": "https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz"
44
36
  },
37
+ "devDependencies": {
38
+ "@types/jest": "^29.5.14",
39
+ "@types/node": "^22.15.15",
40
+ "jest": "^29.7.0",
41
+ "tsconfig-paths": "^4.2.0",
42
+ "typescript": "^5.0.0"
43
+ },
45
44
  "engines": {
46
45
  "node": ">=16.0.0"
47
46
  },