Socket
Socket
Sign inDemoInstall

loupe

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loupe - npm Package Compare versions

Comparing version 2.3.4 to 2.3.5

10

lib/date.js
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",

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