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

timezone-mock

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timezone-mock - npm Package Compare versions

Comparing version 1.1.4 to 1.2.0

14

index.js

@@ -226,2 +226,12 @@ var assert = require('assert');

var orig_object_toString;
function mockDateObjectToString() {
if (this instanceof MockDate) {
// Look just like a regular Date to anything doing very low-level Object.prototype.toString calls
// See: https://github.com/Jimbly/timezone-mock/issues/48
return '[object Date]';
}
return orig_object_toString.call(this);
}
function register(new_timezone, glob) {

@@ -237,2 +247,6 @@ if (!glob) {

glob.Date = MockDate;
if (!orig_object_toString) {
orig_object_toString = Object.prototype.toString;
Object.prototype.toString = mockDateObjectToString;
}
}

@@ -239,0 +253,0 @@ exports.register = register;

2

package.json
{
"name": "timezone-mock",
"version": "1.1.4",
"version": "1.2.0",
"description": "A JavaScript library to mock the local timezone.",

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

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