Comparing version 2.3.4 to 2.3.5
import { truncate } from './helpers' | ||
export default function inspectDate(dateObject, options) { | ||
const stringRepresentation = dateObject.toJSON() | ||
if (stringRepresentation === null) { | ||
return 'Invalid Date' | ||
} | ||
const split = stringRepresentation.split('T') | ||
const date = split[0] | ||
// If we need to - truncate the time portion, but never the date | ||
const split = dateObject.toJSON().split('T') | ||
const date = split[0] | ||
return options.stylize(`${date}T${truncate(split[1], options.truncate - date.length - 1)}`, 'date') | ||
} |
12
loupe.js
@@ -382,5 +382,11 @@ (function (global, factory) { | ||
function inspectDate(dateObject, options) { | ||
// If we need to - truncate the time portion, but never the date | ||
var split = dateObject.toJSON().split('T'); | ||
var date = split[0]; | ||
var stringRepresentation = dateObject.toJSON(); | ||
if (stringRepresentation === null) { | ||
return 'Invalid Date'; | ||
} | ||
var split = stringRepresentation.split('T'); | ||
var date = split[0]; // If we need to - truncate the time portion, but never the date | ||
return options.stylize("".concat(date, "T").concat(truncate(split[1], options.truncate - date.length - 1)), 'date'); | ||
@@ -387,0 +393,0 @@ } |
{ | ||
"name": "loupe", | ||
"version": "2.3.4", | ||
"version": "2.3.5", | ||
"description": "Inspect utility for Node.js and browsers", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/chaijs/loupe", |
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
56311
1335