@awesomeness-js/utils 1.2.7 → 1.2.8

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.
Files changed (2) hide show
  1. package/package.json +25 -25
  2. package/src/utils/clean.js +5 -1
package/package.json CHANGED
@@ -1,27 +1,27 @@
1
1
  {
2
- "name": "@awesomeness-js/utils",
3
- "version": "1.2.7",
4
- "description": "Awesomeness - Utils",
5
- "repository": {
6
- "type": "git",
7
- "url": "git+https://github.com/awesomeness-js/utils.git"
8
- },
9
- "scripts": {
10
- "prebuild": "node ./build/build.js",
11
- "build": "tsc && npm run postBuild",
12
- "postBuild": "node ./build/postBuild.js",
13
- "test": "vitest"
14
- },
15
- "type": "module",
16
- "types": "./types/index.d.ts",
17
- "main": "index.js",
18
- "author": "Scott Forte",
19
- "license": "MIT",
20
- "publishConfig": {
21
- "access": "public"
22
- },
23
- "devDependencies": {
24
- "vitest": "^3.0.9",
25
- "chokidar": "^4.0.3"
26
- }
2
+ "name": "@awesomeness-js/utils",
3
+ "version": "1.2.8",
4
+ "description": "Awesomeness - Utils",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/awesomeness-js/utils.git"
8
+ },
9
+ "scripts": {
10
+ "prebuild": "node ./build/build.js",
11
+ "build": "tsc && npm run postBuild",
12
+ "postBuild": "node ./build/postBuild.js",
13
+ "test": "vitest"
14
+ },
15
+ "type": "module",
16
+ "types": "./types/index.d.ts",
17
+ "main": "index.js",
18
+ "author": "Scott Forte",
19
+ "license": "MIT",
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "devDependencies": {
24
+ "vitest": "^3.0.9",
25
+ "chokidar": "^4.0.3"
26
+ }
27
27
  }
@@ -257,10 +257,14 @@ function cleanObject(obj, schema, {
257
257
 
258
258
  if(origLength !== keysPassed.length){
259
259
 
260
+ const extraKeys = Object.keys(obj).filter((key) => !keysSchema.includes(key));
261
+
260
262
  throw {
261
263
  name: 'KeyError',
262
264
  message: 'Object contains keys not in schema',
263
- keysPassed,
265
+ keysPassed: Object.keys(obj),
266
+ extraKeys,
267
+ filteredKeys: keysPassed,
264
268
  keysSchema,
265
269
  obj
266
270
  };