isvalid 4.2.7 → 4.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.
package/lib/validate.js CHANGED
@@ -467,6 +467,8 @@ const validateAny = async (data, schema, options, keyPath, validatedData) => {
467
467
 
468
468
  if (schema.type !== undefined) {
469
469
  switch (typeName(schema.type).toLowerCase()) {
470
+ case 'any':
471
+ break;
470
472
  case 'object':
471
473
  data = await validateObject(data, schema, options, keyPath, validatedData);
472
474
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isvalid",
3
- "version": "4.2.7",
3
+ "version": "4.2.8",
4
4
  "description": "Async JSON validation library for node.js.",
5
5
  "main": "./index.js",
6
6
  "type": "module",
@@ -20,12 +20,12 @@
20
20
  "@eslint/js": "^9.13.0",
21
21
  "@trenskow/caseit": "^1.4.15",
22
22
  "body-parser": "^2.2.0",
23
- "chai": "^6.2.0",
23
+ "chai": "^6.2.1",
24
24
  "chai-as-promised": "^8.0.2",
25
- "eslint": "^9.37.0",
25
+ "eslint": "^9.39.1",
26
26
  "express": "^5.1.0",
27
- "globals": "^16.4.0",
28
- "mocha": "^11.7.4",
27
+ "globals": "^16.5.0",
28
+ "mocha": "^11.7.5",
29
29
  "supertest": "^7.1.4"
30
30
  },
31
31
  "scripts": {
package/test/validate.js CHANGED
@@ -380,6 +380,11 @@ describe('validate', function() {
380
380
  .and.to.have.property('validator', 'type');
381
381
  });
382
382
  });
383
+ describe('any validator', function() {
384
+ it('should come back with same input as output.', () => {
385
+ return expect(isvalid({ some: 'data' }, 'any')).to.eventually.eql({ some: 'data' });
386
+ });
387
+ });
383
388
  describe('object validator', function() {
384
389
  commonTests.all(Object, {}, 123);
385
390
  it('should come back with same input if sub-schema is not provided.', () => {