Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prisma-mock

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prisma-mock - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

22

lib/index.js

@@ -98,7 +98,21 @@ "use strict";

if (typeof dir === "object") {
const schema = model.fields.find(field => {
return field.name === key;
});
if (!schema) {
return 0;
}
const submodel = datamodel.models.find(model => {
return getCamelCase(model.name) === key;
return model.name === schema.type;
});
const delegate = Delegate(key, submodel);
const res = delegate._sortFunc(dir)(incl(a)[key], incl(b)[key]);
const delegate = Delegate(getCamelCase(schema.type), submodel);
const valA = incl(a);
const valB = incl(b);
if (!valB || !valB[key]) {
return 0;
}
if (!valA || !valA[key]) {
return 0;
}
const res = delegate._sortFunc(dir)(valA[key], valB[key]);
if (res !== 0) {

@@ -108,3 +122,3 @@ return res;

}
else {
else if (!!a && !!b) {
if (a[key] > b[key]) {

@@ -111,0 +125,0 @@ return dir === "asc" ? 1 : -1;

2

package.json
{
"name": "prisma-mock",
"version": "0.1.7",
"version": "0.1.8",
"description": "Mock prisma for unit testing database",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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