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

@knorm/knorm

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@knorm/knorm - npm Package Compare versions

Comparing version 1.4.2 to 1.5.0

12

CHANGELOG.md

@@ -0,1 +1,13 @@

<a name="1.5.0"></a>
# [1.5.0](https://github.com/knorm/knorm/compare/v1.4.1...v1.5.0) (2018-08-19)
### Features
* **Query:** add `hasOption` and `unsetOption` ([17ad152](https://github.com/knorm/knorm/commit/17ad152))
* **Query:** add `Query.prototype.clone` ([2315c45](https://github.com/knorm/knorm/commit/2315c45))
* **Query:** add `unsetOptions` and `getOption` ([d896aec](https://github.com/knorm/knorm/commit/d896aec))
<a name="1.4.2"></a>

@@ -2,0 +14,0 @@ ## [1.4.2](https://github.com/knorm/knorm/compare/v1.4.1...v1.4.2) (2018-08-16)

31

lib/Query.js

@@ -52,7 +52,12 @@ const { difference } = require('lodash');

// TODO: add Query.prototype.reset
// TODO: add Query.prototype.clone
// TODO: add Query.prototype.schema: set schema
// TODO: add Query.prototype.alias: set alias - would be used by @knorm/relations
// depended on by knorm-postgres
clone() {
const clone = new this.constructor(this.model);
clone.config = Object.assign(clone.config, this.config);
clone.options = Object.assign(clone.options, this.options);
return clone;
}
setOption(option, value) {

@@ -82,2 +87,24 @@ this.options[option] = value;

unsetOption(option) {
this.options[option] = undefined;
return this;
}
unsetOptions(options) {
options.forEach(option => {
this.options[option] = undefined;
});
return this;
}
getOption(option) {
return this.options[option];
}
hasOption(option) {
return this.options[option] !== undefined;
}
debug(debug = true) {

@@ -84,0 +111,0 @@ return this.setOption('debug', !!debug);

2

package.json
{
"name": "@knorm/knorm",
"version": "1.4.2",
"version": "1.5.0",
"description": "A purely ES6 class-based ORM for Node.js",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is too big to display

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