@stackone/utils 0.5.0 → 0.7.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.
@@ -0,0 +1,2 @@
1
+ export declare function encodeToBase64(data: string): string;
2
+ export declare function decodeFromBase64(encodedData: string): string;
@@ -0,0 +1,16 @@
1
+ type InputDate = Date | string | null;
2
+ export declare const calculateNextAnniversary: ({ initialDate, format, }: {
3
+ initialDate?: InputDate;
4
+ format?: string;
5
+ }) => Date | null;
6
+ export declare const calculateYearsElapsed: ({ startDate, endDate, format, }: {
7
+ startDate?: InputDate;
8
+ endDate?: InputDate;
9
+ format?: string;
10
+ }) => number | null;
11
+ export declare const dateHasPassed: ({ date, yearsToAdd, format, }: {
12
+ date?: InputDate;
13
+ yearsToAdd?: number;
14
+ format?: string;
15
+ }) => boolean;
16
+ export {};
@@ -0,0 +1 @@
1
+ export declare const getContentHash: (content: unknown) => string;
@@ -2,3 +2,6 @@ export { notMissing, isMissing, isString, isNumber, isBoolean, isDate, isObject,
2
2
  export { safeParseToString, safeParseToNumber, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, } from './parsers';
3
3
  export { getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, getCountryAlpha2CodeByCitizenship, } from './countries/countriesGetters';
4
4
  export { NormalizedKeyMap } from './dataStructures/normalizedKeyMap';
5
+ export { calculateNextAnniversary, calculateYearsElapsed, dateHasPassed } from './dates';
6
+ export { encodeToBase64, decodeFromBase64 } from './base64';
7
+ export { getContentHash } from './hashContent';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackone/utils",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.mjs",