deverything 3.3.1 → 4.1.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.
- package/README.md +6 -4
- package/dist/index.d.mts +896 -0
- package/dist/index.d.ts +104 -87
- package/dist/index.global.js +2 -197
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +2 -192
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -14
package/README.md
CHANGED
|
@@ -30,8 +30,9 @@ Contributions always welcome!
|
|
|
30
30
|
- `isFile()` if it's a file
|
|
31
31
|
- `isFunction()`
|
|
32
32
|
- `isJsDate()` if it's a **valid** javascript's Date
|
|
33
|
-
- `
|
|
34
|
-
- `
|
|
33
|
+
- `isBetweenDates()` check if date falls between two other dates (left inclusive: includes start, excludes end)
|
|
34
|
+
- `isFutureDate()` check if date is in the future, optionally against a reference date
|
|
35
|
+
- `isPastDate()` check if date is in the past, optionally against a reference date
|
|
35
36
|
- `isStringDate()` also checks if the string passed is a **valid** date
|
|
36
37
|
- `isKey()` is a real key of an object
|
|
37
38
|
- `isLastIndex()` is the index is the last item of array
|
|
@@ -61,7 +62,9 @@ Contributions always welcome!
|
|
|
61
62
|
### Dates
|
|
62
63
|
|
|
63
64
|
- `getDateRangeSeries()` generate a series of dates within a range
|
|
64
|
-
- `
|
|
65
|
+
- `getDateSeriesRange()` get the smallest and biggest dates from an array of dates
|
|
66
|
+
- `groupByDateBucket()` group items into date buckets based on their dates and specified time intervals
|
|
67
|
+
- `isOver18()` check if someone is over 18 years old
|
|
65
68
|
- `startOfDay()` get the start of a specific day
|
|
66
69
|
- `startOfNextMonth()`
|
|
67
70
|
- `startOfNextWeek()`
|
|
@@ -148,7 +151,6 @@ Contributions always welcome!
|
|
|
148
151
|
- `formatNumber()` 1000 => "1,000" or "1K" or 0.112 => "11.2%"
|
|
149
152
|
- `formatPercentage()` 0.11 => "11%"
|
|
150
153
|
- `formatIndexProgress()` => "[2/10]"
|
|
151
|
-
- `formatProgress()` format progress as percentage
|
|
152
154
|
- `stringToCSSUnicode()` "hello" => "\000068\000065\00006c\00006c\00006f" use this for CSS
|
|
153
155
|
- `stringToUnicode()` "hello" => "\u0068\u0065\u006c\u006c\u006f"
|
|
154
156
|
|