New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

unreach-util

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unreach-util - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

4

date.js

@@ -88,4 +88,4 @@ export function parse(str) {

const m = match.slice(1, 8).map(v => parseInt(v, 10));
const d = new Date(m[1], m[2], m[3], m[4], m[5], m[6], m[7]);
const z = parseInt(m[8], 10);
const d = new Date(Date.UTC(m[0], m[1] - 1, m[2], m[3], m[4], m[5]));
const z = parseInt(match[8], 10);
// exp +0800 -> should minus 8 hours

@@ -92,0 +92,0 @@ const diff = z / 100 * 3600 * 1000; // to milliseconds

@@ -36,6 +36,10 @@ import { format, friendly, $test } from './date';

it('parse date custom', () => {
const str = '2019-09-14T01:03:55.000+0000';
const date = $test.parseDate(str);
expect(date.getTime()).toBe(date.getTime());
const ds1 = '2019-09-14T01:03:55.000+0000';
const d1 = $test.parseDate(ds1);
expect(d1.getTime()).toBe(new Date(ds1).getTime());
const ds2 = '2019-09-14T01:03:55.000+0800';
const d2 = $test.parseDate(ds2);
expect(d2.getTime()).toBe(new Date(ds2).getTime());
});
});
{
"name": "unreach-util",
"version": "0.9.0",
"version": "0.9.1",
"description": "前端工具基础库",

@@ -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