Socket
Socket
Sign inDemoInstall

jsonsql

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.2.1

examples/date_string_comparing.js

15

index.js

@@ -0,1 +1,3 @@

var utils = require('./utils')
var AND = '&&'

@@ -28,9 +30,2 @@ , OR = '||'

var print = console.log;
function getObjectType(obj) {
return Object.prototype.toString.call(obj);
}
function isDate(obj) {
return getObjectType(obj) === '[object Date]';
}
// ------------------ splitter -------------------- //

@@ -198,5 +193,7 @@

}
// support comparison for Date
if(isDate(res)) res = res.valueOf()
// support comparison for Date/DateString
if(utils.isDate(res)) res = res.valueOf()
else if(utils.isDateString(res)) res = utils.parseDateFromString(res)
else res.toString();
return res

@@ -203,0 +200,0 @@ }

2

package.json
{
"name": "jsonsql",
"version": "0.1.1",
"version": "0.2.1",
"description" : "A SQL-like query language for JSON objects.",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc