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

criterion

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

criterion - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

2

package.json
{
"name": "criterion",
"version": "0.3.1",
"version": "0.3.2",
"description": "criterion describes sql-where-conditions as objects which can be combined and manipulated",

@@ -5,0 +5,0 @@ "keywords": ["sql", "condition", "where"],

// Generated by CoffeeScript 1.6.3
var beget, comparisonConstructorByOperator, constructors, isNotCriterion, prototypes;
var beget, comparisonConstructorByOperator, constructors, isNotCriterion, isRaw, prototypes, _ref;
beget = require('./util').beget;
_ref = require('./util'), beget = _ref.beget, isRaw = _ref.isRaw;

@@ -40,3 +40,3 @@ prototypes = {};

sql: function() {
if ('function' === typeof this._v.sql) {
if (isRaw(this._v)) {
return "" + this._k + " " + this._op + " " + (this._v.sql());

@@ -48,3 +48,3 @@ } else {

params: function() {
if ('function' === typeof this._v.sql) {
if (isRaw(this._v)) {
if ('function' === typeof this._v.params) {

@@ -51,0 +51,0 @@ return this._v.params();

@@ -34,2 +34,5 @@ // Generated by CoffeeScript 1.6.3

value = first[key];
if (value == null) {
throw new Error("value undefined or null for key " + key);
}
if (key === '$or') {

@@ -50,5 +53,2 @@ return constructors.or(arrayify(value).map(factory));

}
if (value == null) {
throw new Error("value undefined or null for key " + key);
}
keys = Object.keys(value);

@@ -55,0 +55,0 @@ modifier = keys[0];

@@ -35,1 +35,5 @@ // Generated by CoffeeScript 1.6.3

};
module.exports.isRaw = function(value) {
return (value != null) && 'function' === typeof value.sql;
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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