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

think-model-abstract

Package Overview
Dependencies
Maintainers
8
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

think-model-abstract - npm Package Compare versions

Comparing version 1.4.0 to 1.4.2

11

lib/query.js

@@ -92,15 +92,16 @@ const helper = require('think-helper');

const parser = this.parser;
const fields = Object.keys(data[0]).map(item => parser.parseKey(item));
let fields = Object.keys(data[0]);
const values = data.map(item => {
const value = [];
for (const key in item) {
let val = item[key];
val = parser.parseValue(val);
fields.forEach(key => {
const val = parser.parseValue(item[key]);
if (helper.isString(val) || helper.isBoolean(val) || helper.isNumber(val)) {
value.push(val);
}
}
});
return `(${value.join(',')})`;
}).join(',');
fields = fields.map(field => parser.parseKey(field));
// compatiable with boolean and array update property value

@@ -107,0 +108,0 @@ if (options.update === true) {

{
"name": "think-model-abstract",
"version": "1.4.0",
"version": "1.4.2",
"description": "Abstract adapter for ThinkJS 3.x",

@@ -5,0 +5,0 @@ "scripts": {

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