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

uniqorm

Package Overview
Dependencies
Maintainers
1
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uniqorm - npm Package Compare versions

Comparing version 2.5.0 to 2.6.0

lib/fields/TIMESTAMPTZ.js

10

lib/fields/TIMESTAMP.js

@@ -16,3 +16,3 @@ /* UNIQORM

const DATE_PATTERN = /^(19[0-9]{2}|2[0-9]{3})-(0[1-9]|1[012])-([123]0|[012][1-9]|31)(?:[ T]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(?:\.(\d{1,6}))?)?$/;
const TIMESTAMP_PATTERN = /^(19[0-9]{2}|2[0-9]{3})-?(0[1-9]|1[012])-?([123]0|[012][1-9]|31)(?:[ T]([01][0-9]|2[0-3]):?([0-5][0-9]):?([0-5][0-9])(?:\.(\d{1,6}))?)?$/;

@@ -56,5 +56,5 @@ /**

return value;
if (isNumeric(value))
if (typeof value === 'number')
return new Date(value);
const m = String(value).match(DATE_PATTERN);
const m = String(value).match(TIMESTAMP_PATTERN);
if (!m)

@@ -75,6 +75,2 @@ throw new ArgumentError('"%s" is not a valid date format', String(value));

function isNumeric(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
}
/**

@@ -81,0 +77,0 @@ * Expose `TIMESTAMP`.

@@ -31,2 +31,3 @@ /* UNIQORM

DataField.register(require('./fields/TIMESTAMP'));
DataField.register(require('./fields/TIMESTAMPTZ'));
DataField.register(require('./fields/TIME'));

@@ -33,0 +34,0 @@ DataField.register(require('./fields/CLOB'));

{
"name": "uniqorm",
"description": "Multi dialect and multi schema ORM framework for enterprise level NodeJS applications",
"version": "2.5.0",
"version": "2.6.0",
"author": "Panates Ltd.",

@@ -31,3 +31,3 @@ "contributors": [

"babel-eslint": "^10.0.1",
"eslint": "^5.9.0",
"eslint": "^5.10.0",
"eslint-config-google": "^0.11.0",

@@ -34,0 +34,0 @@ "mocha": "^5.2.0",

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