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

think-model

Package Overview
Dependencies
Maintainers
8
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.4.1 to 1.4.2

mock/increment.js

6

lib/model.js

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

}
// user should set key timeout in here
// so we should sperate it to avoid it covers cacheConfig.timeout
config._keyTimeout = config.timeout;
delete config.timeout;
const cacheConfig = this._cacheConfig;

@@ -115,0 +121,0 @@ if (cacheConfig) {

2

package.json
{
"name": "think-model",
"version": "1.4.1",
"version": "1.4.2",
"description": "An adapter-based ORM for ThinkJS 3.x",

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

@@ -91,6 +91,6 @@ const {test} = require('ava');

model.cache(500);
t.is(model.options.cache.timeout, 500);
t.is(model.options.cache._keyTimeout, 500);
model.cache('page', {timeout: 300});
t.is(model.options.cache.key, 'page');
t.is(model.options.cache.timeout, 300);
t.is(model.options.cache._keyTimeout, 300);
model.cache('page', {key: 'post'});

@@ -97,0 +97,0 @@ t.is(model.options.cache.key, 'post');

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