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

think-model

Package Overview
Dependencies
Maintainers
7
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

think-model - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

test/index.js

6

index.d.ts

@@ -237,3 +237,3 @@

interface ModelThknkExtend {
interface ModelThinkExtend {
Model: Model;

@@ -249,3 +249,3 @@ }

declare module 'thinkjs' {
interface Think extends ThinkModel.ModelExtend, ThinkModel.ModelThknkExtend {}
interface Think extends ThinkModel.ModelExtend, ThinkModel.ModelThinkExtend {}
interface Controller extends ThinkModel.ModelExtend {}

@@ -256,2 +256,2 @@ interface Context extends ThinkModel.ModelExtend {}

export = ThinkModel;
export = ThinkModel;

@@ -36,8 +36,8 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

db(db) {
const Handle = this.config.handle;
if (db) {
this[DB] = db;
this[DB] = new Handle(this, { query: db.query });
return this;
}
if (this[DB]) return this[DB];
const Handle = this.config.handle;
const instance = new Handle(this);

@@ -557,3 +557,3 @@ this[DB] = instance;

if (helper.isEmpty(parsedData)) {
return Promise.reject(new Error('update data is empty'));
return Promise.reject(new Error(`update data is empty, original data is ${JSON.stringify(data)}`));
}

@@ -728,7 +728,7 @@ const rows = yield _this7.db().update(parsedData, options);

field.split(/\s*,\s*/).forEach(function (item) {
result[item] = [];
result[item] = one === true ? undefined : [];
});
return result;
} else {
return [];
return one === true ? undefined : [];
}

@@ -735,0 +735,0 @@ }

{
"name": "think-model",
"version": "1.1.5",
"version": "1.1.6",
"description": "An adapter-based ORM 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