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

@yuants/data-model

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yuants/data-model - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

4

dist/utils.js

@@ -103,5 +103,5 @@ import { format } from 'date-fns';

if (timeZone) {
return formatInTimeZone(time, timeZone, 'yyyy-MM-dd HH:mm:ssXXX');
return formatInTimeZone(time, timeZone, 'yyyy-MM-dd HH:mm:ss.SSSXXX');
}
return format(new Date(time), 'yyyy-MM-dd HH:mm:ssXXX');
return format(new Date(time), 'yyyy-MM-dd HH:mm:ss.SSSXXX');
}

@@ -108,0 +108,0 @@ catch (e) {

@@ -48,7 +48,7 @@ import { decodePath, encodePath, formatTime } from './utils';

const date = new Date('2022-01-01T00:00:00Z');
expect(formatTime(date, 'America/New_York')).toEqual('2021-12-31 19:00:00-05:00');
expect(formatTime(date, 'America/New_York')).toEqual('2021-12-31 19:00:00.000-05:00');
});
it('should format a timestamp with specified timezone', () => {
const timestamp = 1640995200000; // 2022-01-01T00:00:00Z
expect(formatTime(timestamp, 'America/New_York')).toEqual('2021-12-31 19:00:00-05:00');
expect(formatTime(timestamp, 'America/New_York')).toEqual('2021-12-31 19:00:00.000-05:00');
});

@@ -55,0 +55,0 @@ it('should return "Invalid Date" for an invalid date', () => {

@@ -111,5 +111,5 @@ "use strict";

if (timeZone) {
return (0, date_fns_tz_1.formatInTimeZone)(time, timeZone, 'yyyy-MM-dd HH:mm:ssXXX');
return (0, date_fns_tz_1.formatInTimeZone)(time, timeZone, 'yyyy-MM-dd HH:mm:ss.SSSXXX');
}
return (0, date_fns_1.format)(new Date(time), 'yyyy-MM-dd HH:mm:ssXXX');
return (0, date_fns_1.format)(new Date(time), 'yyyy-MM-dd HH:mm:ss.SSSXXX');
}

@@ -116,0 +116,0 @@ catch (e) {

@@ -50,7 +50,7 @@ "use strict";

const date = new Date('2022-01-01T00:00:00Z');
expect((0, utils_1.formatTime)(date, 'America/New_York')).toEqual('2021-12-31 19:00:00-05:00');
expect((0, utils_1.formatTime)(date, 'America/New_York')).toEqual('2021-12-31 19:00:00.000-05:00');
});
it('should format a timestamp with specified timezone', () => {
const timestamp = 1640995200000; // 2022-01-01T00:00:00Z
expect((0, utils_1.formatTime)(timestamp, 'America/New_York')).toEqual('2021-12-31 19:00:00-05:00');
expect((0, utils_1.formatTime)(timestamp, 'America/New_York')).toEqual('2021-12-31 19:00:00.000-05:00');
});

@@ -57,0 +57,0 @@ it('should return "Invalid Date" for an invalid date', () => {

{
"name": "@yuants/data-model",
"version": "0.2.0",
"version": "0.2.1",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "module": "dist/index.js",

{
"libraries/data-model/CHANGELOG.json": "93c84fc3249439314247d03cecfa9c2e35999336",
"libraries/data-model/CHANGELOG.md": "880100390bd694965f1db9fc767462d3c9ae47f0",
"libraries/data-model/CHANGELOG.json": "04e67bff348e67d2ba559cdb8fb3b44278d4fc14",
"libraries/data-model/CHANGELOG.md": "eb47b87b2b1bfd92f2efa8e6d8f47d30e7a0b43d",
"libraries/data-model/api-extractor.json": "62f4fd324425b9a235f0c117975967aab09ced0c",

@@ -9,7 +9,7 @@ "libraries/data-model/config/jest.config.json": "4bb17bde3ee911163a3edb36a6eb71491d80b1bd",

"libraries/data-model/etc/data-model.api.md": "731523226202dfd693733c590127881b066053e3",
"libraries/data-model/package.json": "4fafe5f609c0c3e0fa97fce670d92cd0c37a1ed6",
"libraries/data-model/package.json": "aeddad29b67ccfbe8a6d23f41082d04f26aea416",
"libraries/data-model/src/index.ts": "49fc2befb673b800db4cdba4235ab4ddb6736788",
"libraries/data-model/src/interfaces.ts": "e4d4cc45d495aca3f667cb72b16f0058a686633e",
"libraries/data-model/src/utils.test.ts": "734ecde19582f04e5a973c796307b6a70c03bc2c",
"libraries/data-model/src/utils.ts": "10c656a0b73e64640e025faf7e7e85474db97d85",
"libraries/data-model/src/utils.test.ts": "d4a493922e5c87b47bf59b064fcb807a1411310c",
"libraries/data-model/src/utils.ts": "c7f7d37e9fef2f31dd9eb778c29d9b17d27966a7",
"libraries/data-model/tsconfig.json": "22f94ca28b507f8ddcc21b9053158eefd3f726a9",

@@ -16,0 +16,0 @@ "libraries/data-model/.rush/temp/shrinkwrap-deps.json": "fcb3fca669b68350f864742e0343d7dabb11d9a5",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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