postgresql-client
Advanced tools
Comparing version 1.16.3 to 1.16.4
@@ -42,4 +42,5 @@ "use strict"; | ||
isType(v) { | ||
return (v instanceof Date) && | ||
(v.getFullYear() == 1970 && v.getMonth() === 0 && v.getDate() === 1); | ||
return ((v instanceof Date) && | ||
(v.getFullYear() === 1970 && v.getMonth() === 0 && v.getDate() === 1)) || | ||
(typeof v === 'string' && parse_time_1.STRICT_TIME_PATTERN.test(v)); | ||
} | ||
@@ -46,0 +47,0 @@ }; |
@@ -0,2 +1,3 @@ | ||
export declare const STRICT_TIME_PATTERN: RegExp; | ||
export declare const TIME_PATTERN: RegExp; | ||
export declare function parseTime(str: string, parseTimeZone?: boolean, utc?: boolean): Date; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseTime = exports.TIME_PATTERN = void 0; | ||
exports.parseTime = exports.TIME_PATTERN = exports.STRICT_TIME_PATTERN = void 0; | ||
const fast_parseint_1 = require("./fast-parseint"); | ||
// eslint-disable-next-line | ||
exports.TIME_PATTERN = /([01][0-9]|2[0-3]):?([0-5][0-9]):?([0-5][0-9])?(?:\.(\d+))?(?:(Z)|(?:([+-])([01]?[0-9]|2[0-3]):?([0-5][0-9])?))?$/; | ||
// noinspection RegExpUnnecessaryNonCapturingGroup | ||
exports.STRICT_TIME_PATTERN = /^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(?:\.(\d+))?(?:(Z)|(?:([+-])([01]?[0-9]|2[0-3]):?([0-5][0-9])?))?$/; | ||
// noinspection RegExpUnnecessaryNonCapturingGroup | ||
exports.TIME_PATTERN = /^([01][0-9]|2[0-3]):?([0-5][0-9]):?([0-5][0-9])?(?:\.(\d+))?(?:(Z)|(?:([+-])([01]?[0-9]|2[0-3]):?([0-5][0-9])?))?$/; | ||
function parseTime(str, parseTimeZone, utc) { | ||
let m = str.match(exports.TIME_PATTERN); | ||
const m = str.match(exports.TIME_PATTERN); | ||
if (!m) | ||
@@ -10,0 +13,0 @@ return new Date('invalid'); |
{ | ||
"name": "postgresql-client", | ||
"description": "Professional PostgreSQL client for JavaScript and TypeScript", | ||
"version": "1.16.3", | ||
"version": "1.16.4", | ||
"author": "Panates", | ||
@@ -79,3 +79,4 @@ "contributors": [ | ||
"clean:src": "ts-cleanup -s src --all | ts-cleanup -s test", | ||
"build": "npm run clean | npm run lint | tsc -b tsconfig-build.json", | ||
"prebuild": "npm run clean | npm run lint", | ||
"build": "tsc -b tsconfig-build.json", | ||
"compile": "tsc -b tsconfig.json", | ||
@@ -82,0 +83,0 @@ "lint": "eslint src/** --no-error-on-unmatched-pattern", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
199818
5139
2