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

@prisma/binding-argument-transform

Package Overview
Dependencies
Maintainers
8
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prisma/binding-argument-transform - npm Package Compare versions

Comparing version 0.2.1 to 0.3.1

2

dist/binding-argument-transform.cjs.development.js

@@ -141,3 +141,3 @@ 'use strict';

} else {
if (typeof val === 'object' && !Array.isArray(val)) {
if (typeof val === 'object' && !Array.isArray(val) && val !== null) {
transformedWhere[operator] = transformNestedOperators(val);

@@ -144,0 +144,0 @@ } else {

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("lodash");function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var n=["_some","_every","_none"],o=["_not_contains","_not_starts_with","_not_ends_with"],i=["_not_in"].concat(o,n,["_not","_in","_lte","_lt","_gte","_gt","_contains","_starts_with","_ends_with"]),a=function(t){var e=i.find((function(e){return t.endsWith(e)}))||t;return[e,t.lastIndexOf(e)]},s=function(t){return o.some((function(e){return t.endsWith(e)}))},u=function(t){return n.some((function(e){return t.endsWith(e)}))},l=function(e,r){var n,o=e.split("_not");return(n={})[t.camelCase(o[1])]=r,n},c=function(t){if(Array.isArray(t)){for(var e,n=[],o=function(t){var e=0;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(t){if("string"==typeof t)return r(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,void 0):void 0}}(t)))return function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(e=t[Symbol.iterator]()).next.bind(e)}(t);!(e=o()).done;)n.push(f(e.value));return n}return f(t)},f=function(r){if(void 0!==r){for(var n={},o=0,i=Object.entries(r);o<i.length;o++){var f=i[o],v=f[0],d=f[1],_=a(v),y=_[0],m=_[1];if(y===v)n[y]=["AND","OR","NOT"].includes(y)?c(d):"object"!=typeof d||Array.isArray(d)?d:c(d);else{var p,h=v.slice(0,m);if(s(y))n[h]=e(e({},n[h]),{},{not:e(e({},null===(p=n[h])||void 0===p?void 0:p.not),l(y,d))});else if(u(y)){var b,O=t.camelCase(y.slice(1));n[h]=e(e({},n[h]),{},((b={})[O]=c(d),b))}else{var g,A=t.camelCase(y.slice(1));n[h]=e(e({},n[h]),{},((g={})[A]=d,g))}}}return n}};exports.makeOrderByPrisma2Compatible=function(t){var e;if(t){var r=t.lastIndexOf("_"),n=[t.slice(0,r),t.slice(r+1).toLocaleLowerCase()];return(e={})[n[0]]=n[1],e}},exports.makeWherePrisma2Compatible=f;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("lodash");function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var n=["_some","_every","_none"],o=["_not_contains","_not_starts_with","_not_ends_with"],i=["_not_in"].concat(o,n,["_not","_in","_lte","_lt","_gte","_gt","_contains","_starts_with","_ends_with"]),a=function(t){var e=i.find((function(e){return t.endsWith(e)}))||t;return[e,t.lastIndexOf(e)]},s=function(t){return o.some((function(e){return t.endsWith(e)}))},l=function(t){return n.some((function(e){return t.endsWith(e)}))},u=function(e,r){var n,o=e.split("_not");return(n={})[t.camelCase(o[1])]=r,n},c=function(t){if(Array.isArray(t)){for(var e,n=[],o=function(t){var e=0;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(t){if("string"==typeof t)return r(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,void 0):void 0}}(t)))return function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(e=t[Symbol.iterator]()).next.bind(e)}(t);!(e=o()).done;)n.push(f(e.value));return n}return f(t)},f=function(r){if(void 0!==r){for(var n={},o=0,i=Object.entries(r);o<i.length;o++){var f=i[o],v=f[0],d=f[1],_=a(v),y=_[0],m=_[1];if(y===v)n[y]=["AND","OR","NOT"].includes(y)?c(d):"object"!=typeof d||Array.isArray(d)||null===d?d:c(d);else{var p,h=v.slice(0,m);if(s(y))n[h]=e(e({},n[h]),{},{not:e(e({},null===(p=n[h])||void 0===p?void 0:p.not),u(y,d))});else if(l(y)){var b,O=t.camelCase(y.slice(1));n[h]=e(e({},n[h]),{},((b={})[O]=c(d),b))}else{var g,A=t.camelCase(y.slice(1));n[h]=e(e({},n[h]),{},((g={})[A]=d,g))}}}return n}};exports.makeOrderByPrisma2Compatible=function(t){var e;if(t){var r=t.lastIndexOf("_"),n=[t.slice(0,r),t.slice(r+1).toLocaleLowerCase()];return(e={})[n[0]]=n[1],e}},exports.makeWherePrisma2Compatible=f;
//# sourceMappingURL=binding-argument-transform.cjs.production.min.js.map

@@ -137,3 +137,3 @@ import { camelCase } from 'lodash-es';

} else {
if (typeof val === 'object' && !Array.isArray(val)) {
if (typeof val === 'object' && !Array.isArray(val) && val !== null) {
transformedWhere[operator] = transformNestedOperators(val);

@@ -140,0 +140,0 @@ } else {

{
"version": "0.2.1",
"version": "0.3.1",
"license": "MIT",

@@ -4,0 +4,0 @@ "main": "dist/index.js",

@@ -38,3 +38,3 @@ import { camelCase } from 'lodash';

} else {
if (typeof val === 'object' && !Array.isArray(val)) {
if (typeof val === 'object' && !Array.isArray(val) && val !== null) {
transformedWhere[operator] = transformNestedOperators(val);

@@ -41,0 +41,0 @@ } else {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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