@stackone/utils 0.9.0 → 0.9.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/dist/index.d.mts CHANGED
@@ -79,6 +79,13 @@ declare const exponentialBackoffInMS: (retryCount: number, baseRetryDelayInMS?:
79
79
  //#region src/hashContent.d.ts
80
80
  declare const getContentHash: (content: unknown) => string;
81
81
  //#endregion
82
+ //#region src/ipAddr.d.ts
83
+ declare const isValidIp: (ip: string) => boolean;
84
+ declare const isValidIpRange: (pattern: string) => boolean;
85
+ declare const isValidIpRanges: (patterns: string[]) => boolean;
86
+ declare const isIpInRanges: (ip: string, patterns: string[]) => boolean;
87
+ declare const isIpInRange: (ip: string, pattern: string) => boolean;
88
+ //#endregion
82
89
  //#region src/parsers.d.ts
83
90
  declare const safeParseToString: ({
84
91
  value
@@ -128,4 +135,4 @@ declare const isFutureUnixTimestamp: (value: unknown) => boolean;
128
135
  declare const isValidUUID: (uuid: string) => boolean;
129
136
  declare const generateRequestId: (randomUUIDGenerator?: typeof randomUUID) => string;
130
137
  //#endregion
131
- export { NormalizedKeyMap, calculateNextAnniversary, calculateYearsElapsed, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exponentialBackoffInMS, generateRequestId, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isMissing, isNumber, isObject, isString, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString };
138
+ export { NormalizedKeyMap, calculateNextAnniversary, calculateYearsElapsed, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exponentialBackoffInMS, generateRequestId, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isIpInRange, isIpInRanges, isMissing, isNumber, isObject, isString, isValidIp, isValidIpRange, isValidIpRanges, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString };
package/dist/index.d.ts CHANGED
@@ -79,6 +79,13 @@ declare const exponentialBackoffInMS: (retryCount: number, baseRetryDelayInMS?:
79
79
  //#region src/hashContent.d.ts
80
80
  declare const getContentHash: (content: unknown) => string;
81
81
  //#endregion
82
+ //#region src/ipAddr.d.ts
83
+ declare const isValidIp: (ip: string) => boolean;
84
+ declare const isValidIpRange: (pattern: string) => boolean;
85
+ declare const isValidIpRanges: (patterns: string[]) => boolean;
86
+ declare const isIpInRanges: (ip: string, patterns: string[]) => boolean;
87
+ declare const isIpInRange: (ip: string, pattern: string) => boolean;
88
+ //#endregion
82
89
  //#region src/parsers.d.ts
83
90
  declare const safeParseToString: ({
84
91
  value
@@ -128,4 +135,4 @@ declare const isFutureUnixTimestamp: (value: unknown) => boolean;
128
135
  declare const isValidUUID: (uuid: string) => boolean;
129
136
  declare const generateRequestId: (randomUUIDGenerator?: typeof randomUUID) => string;
130
137
  //#endregion
131
- export { NormalizedKeyMap, calculateNextAnniversary, calculateYearsElapsed, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exponentialBackoffInMS, generateRequestId, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isMissing, isNumber, isObject, isString, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString };
138
+ export { NormalizedKeyMap, calculateNextAnniversary, calculateYearsElapsed, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exponentialBackoffInMS, generateRequestId, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isIpInRange, isIpInRanges, isMissing, isNumber, isObject, isString, isValidIp, isValidIpRange, isValidIpRanges, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString };