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

think-model

Package Overview
Dependencies
Maintainers
2
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.0.5 to 1.0.6

2

index.js

@@ -9,3 +9,3 @@ const helper = require('think-helper');

const Cls = models[name] || Model;
const modelName = path.basename(name);
const modelName = name ? path.basename(name) : name;
const instance = new Cls(modelName, config);

@@ -12,0 +12,0 @@ // add models in config, it's need in model when get relation model instance

@@ -786,3 +786,2 @@ 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"); }); }; }

[QUOTE_FIELD](field) {
field = field || this.pk;
if (field) return this.db().parseKey(field);

@@ -789,0 +788,0 @@ return '*';

{
"name": "think-model",
"version": "1.0.5",
"version": "1.0.6",
"description": "An adapter-based ORM for ThinkJS 3.x",

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

@@ -761,3 +761,3 @@ const {test} = require('ava');

model.getField = function(sql) {
t.is(sql, `${logic.toUpperCase()}(id) AS think_${logic}`);
t.is(sql, `${logic.toUpperCase()}(*) AS think_${logic}`);
};

@@ -771,3 +771,3 @@ model[logic]();

model.getField = function(sql) {
t.is(sql, `${logic.toUpperCase()}(post_id) AS think_${logic}`);
t.is(sql, `${logic.toUpperCase()}(*) AS think_${logic}`);
};

@@ -774,0 +774,0 @@ model[logic]();

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