@valkyriestudios/utils 7.4.0 → 7.5.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/CHANGELOG.md +10 -0
- package/README.md +1 -1
- package/date/addUTC.js +6 -0
- package/equal.js +1 -2
- package/is.js +1 -2
- package/object/merge.js +1 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic
|
|
6
6
|
Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [7.5.0] - 2023-10-22
|
|
9
|
+
### Improved
|
|
10
|
+
- Dep: Upgrade @babel/cli to 7.23.0
|
|
11
|
+
- Dep: Upgrade @babel/core to 7.23.2
|
|
12
|
+
- Dep: Upgrade @babel/preset-env to 7.23.2
|
|
13
|
+
- Dep: Upgrade @babel/register to 7.22.15
|
|
14
|
+
- Dep: Upgrade chai to 4.3.10
|
|
15
|
+
- Dep: Upgrade eslint to 8.52.0
|
|
16
|
+
- date/addUTC now supports millisecond/milliseconds as keys
|
|
17
|
+
|
|
8
18
|
## [7.4.0] - 2023-08-10
|
|
9
19
|
### Added
|
|
10
20
|
- regexp/sanitize
|
package/README.md
CHANGED
|
@@ -349,7 +349,7 @@ endOfUTC(new Date("2023-05-04T12:04:27.043+02:00"), 'second'); // new Date("2023
|
|
|
349
349
|
```
|
|
350
350
|
|
|
351
351
|
- **addUTC(val:Date, amount:integer, key:String)**
|
|
352
|
-
Take the incoming date and add a certain amount of the passed key. Possible key options(year,years,month,months,day,days,hour,hours,minute,minutes,second,seconds).
|
|
352
|
+
Take the incoming date and add a certain amount of the passed key. Possible key options(year,years,month,months,day,days,hour,hours,minute,minutes,second,seconds,millisecond,milliseconds).
|
|
353
353
|
|
|
354
354
|
Note: Does not touch the date object passed
|
|
355
355
|
```js
|
package/date/addUTC.js
CHANGED
|
@@ -50,6 +50,12 @@ function addUTC(val, amount, key) {
|
|
|
50
50
|
copy.setUTCSeconds(copy.getUTCSeconds() + amount);
|
|
51
51
|
return copy;
|
|
52
52
|
}
|
|
53
|
+
case 'milliseconds':
|
|
54
|
+
case 'millisecond':
|
|
55
|
+
{
|
|
56
|
+
copy.setUTCMilliseconds(copy.getUTCMilliseconds() + amount);
|
|
57
|
+
return copy;
|
|
58
|
+
}
|
|
53
59
|
default:
|
|
54
60
|
return copy;
|
|
55
61
|
}
|
package/equal.js
CHANGED
package/is.js
CHANGED
package/object/merge.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valkyriestudios/utils",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.5.0",
|
|
4
4
|
"description": "A collection of single-function utilities for common tasks",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": {
|
|
@@ -32,19 +32,19 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/ValkyrieStudios/utils#readme",
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@babel/cli": "^7.
|
|
36
|
-
"@babel/core": "^7.
|
|
37
|
-
"@babel/preset-env": "^7.
|
|
38
|
-
"@babel/register": "^7.22.
|
|
35
|
+
"@babel/cli": "^7.23.0",
|
|
36
|
+
"@babel/core": "^7.23.2",
|
|
37
|
+
"@babel/preset-env": "^7.23.2",
|
|
38
|
+
"@babel/register": "^7.22.15",
|
|
39
39
|
"babel-plugin-check-es2015-constants": "^6.22.0",
|
|
40
40
|
"babel-plugin-transform-member-expression-literals": "^6.9.4",
|
|
41
41
|
"babel-plugin-transform-minify-booleans": "^6.9.4",
|
|
42
42
|
"babel-plugin-transform-property-literals": "^6.9.4",
|
|
43
43
|
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
44
|
-
"chai": "^4.3.
|
|
44
|
+
"chai": "^4.3.10",
|
|
45
45
|
"chai-as-promised": "^7.1.1",
|
|
46
46
|
"chai-spies": "^1.0.0",
|
|
47
|
-
"eslint": "^8.
|
|
47
|
+
"eslint": "^8.52.0",
|
|
48
48
|
"mocha": "^10.2.0",
|
|
49
49
|
"nyc": "^15.1.0"
|
|
50
50
|
}
|