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

timezone-abbreviations

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timezone-abbreviations - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

babel.config.js

11

dist/test.js

@@ -8,4 +8,9 @@ "use strict";

const data_json_1 = __importDefault(require("./data.json"));
console.assert(index_1.default[0].abbr === data_json_1.default[1].abbr, "'\x1b[31m%s\x1b[0m'", "timezone data is not matching");
console.log("timezones type", typeof index_1.default[0]);
console.log("timezones", ...index_1.default.filter((item) => item.abbr === "AEST"));
test("check random item should match", () => {
const randomNumber = Math.floor((index_1.default.length - 1) * Math.random());
console.log("length", index_1.default.length);
console.log("randomNumber", randomNumber);
expect(index_1.default[randomNumber].abbr).toBe(data_json_1.default[randomNumber].abbr);
console.log("timezones", ...index_1.default.filter((item) => item.abbr === "AEST"));
console.log("timezones type", typeof index_1.default[0]);
});
{
"name": "timezone-abbreviations",
"version": "1.2.1",
"version": "1.2.2",
"description": "",

@@ -8,3 +8,3 @@ "main": "dist/index.js",

"build": "tsc",
"test": "node --experimental-modules --loader ts-node/esm src/test.ts"
"test": "jest"
},

@@ -15,7 +15,13 @@ "keywords": [],

"devDependencies": {
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7",
"@tsconfig/node14": "^1.0.1",
"@tsconfig/node16": "^1.0.2",
"@types/jest": "^27.4.1",
"@types/node": "^17.0.23",
"jest": "^27.5.1",
"ts-node": "^10.7.0",
"typescript": "^4.6.2"
}
},
"dependencies": {}
}
import timezones from "./index";
import timezoneData from "./data.json";
console.assert(
timezones[0].abbr === timezoneData[1].abbr,
"'\x1b[31m%s\x1b[0m'",
"timezone data is not matching"
);
console.log("timezones type", typeof timezones[0]);
console.log("timezones", ...timezones.filter((item) => item.abbr === "AEST"));
test("check random item should match", () => {
const randomNumber = Math.floor((timezones.length - 1) * Math.random());
console.log("length", timezones.length);
console.log("randomNumber", randomNumber);
expect(timezones[randomNumber].abbr).toBe(timezoneData[randomNumber].abbr);
console.log("timezones", ...timezones.filter((item) => item.abbr === "AEST"));
console.log("timezones type", typeof timezones[0]);
});
{
"extends": "@tsconfig/node14/tsconfig.json",
"module": "commonjs",
"compilerOptions": {
"outDir": "dist",
"resolveJsonModule": true,
"declaration": true,
"esModuleInterop": true
}
}
"extends": "@tsconfig/node16/tsconfig.json",
"module": "commonjs",
"compilerOptions": {
"outDir": "dist",
"resolveJsonModule": true,
"declaration": true,
"esModuleInterop": true
}
}
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