timezone-js-ts
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -49,3 +49,3 @@ "use strict"; | ||
const fs = __importStar(require("fs")); | ||
const path = __importStar(require("path")); | ||
// import * as path from 'path'; | ||
// --------------------------------------------------------- | ||
@@ -160,7 +160,7 @@ // ------------------------- Helpers ---------------------- | ||
const diff = getTimeDiff(IANA_timezone_destination, IANA_timezone_source); | ||
const actualPath = path.resolve(__dirname, './timezoneConverterOutputs.json'); | ||
// const actualPath = path.resolve(__dirname, './timezoneConverterOutputs.json'); | ||
let fileData = []; | ||
// fetch old data if exists | ||
if (fs.existsSync(actualPath)) { | ||
const content = fs.readFileSync(actualPath, 'utf8'); | ||
if (fs.existsSync('./timezoneConverterOutputs.json')) { | ||
const content = fs.readFileSync('./timezoneConverterOutputs.json', 'utf8'); | ||
fileData = JSON.parse(content)[0].data; | ||
@@ -176,3 +176,3 @@ } | ||
// write data into json file | ||
fs.writeFile(actualPath, JSON.stringify(obj, null, " "), 'utf-8', err => { | ||
fs.writeFile('./timezoneConverterOutputs.json', JSON.stringify(obj, null, " "), 'utf-8', err => { | ||
if (err) | ||
@@ -179,0 +179,0 @@ throw err; |
{ | ||
"name": "timezone-js-ts", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11590725