Socket
Socket
Sign inDemoInstall

@orion-js/models

Package Overview
Dependencies
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orion-js/models - npm Package Compare versions

Comparing version 3.0.20 to 3.0.24

26

lib/createModel/validation.test.js

@@ -7,2 +7,3 @@ "use strict";

const index_1 = __importDefault(require("./index"));
const resolvers_1 = require("@orion-js/resolvers");
it('should validate a schema', async () => {

@@ -48,1 +49,26 @@ const model = (0, index_1.default)({

});
it('[regression test]: should allow correct doc cleaning for resolver params', async () => {
const Point = (0, index_1.default)({
name: 'Point',
schema: {
latitude: {
type: Number
},
longitude: {
type: Number
}
}
});
const resolver1 = (0, resolvers_1.resolver)({
params: {
point: {
type: Point
}
},
async resolve({ point }) {
return point;
}
});
const doc = await resolver1.resolve({ point: { latitude: '11', longitude: '12' } });
expect(doc).toEqual({ latitude: 11, longitude: 12 });
});

6

package.json
{
"name": "@orion-js/models",
"version": "3.0.20",
"version": "3.0.24",
"main": "lib/index.js",

@@ -21,3 +21,3 @@ "types": "lib/index.d.ts",

"@orion-js/helpers": "^3.0.17",
"@orion-js/resolvers": "^3.0.17",
"@orion-js/resolvers": "^3.0.24",
"@orion-js/schema": "^3.0.17"

@@ -40,3 +40,3 @@ },

},
"gitHead": "ed37da2a1a61a9a4c0b9935d77e29d83a423e199"
"gitHead": "5ac1c68e72af3dbeaf8eb5c2a04d5325da2a7e3f"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc