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

zalopay-formatters

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zalopay-formatters - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

2

dist/date.d.ts
declare function stringWithTimesamp(timestamp: number, format?: string): string;
declare function stringFromTimeStamp(timestamp: number, format: string): string;
declare function convertFormat(dateString: string, fromFormat: string, toFormat: string): string;
declare const _default: {
stringWithTimesamp: typeof stringWithTimesamp;
stringFromTimeStamp: typeof stringFromTimeStamp;
convertFormat: typeof convertFormat;
};
export default _default;

10

dist/date.js

@@ -7,6 +7,9 @@ "use strict";

const moment_1 = __importDefault(require("moment"));
function stringWithTimesamp(timestamp, format = "DD/MM/YYYY - HH:mm") {
const time = moment_1.default(timestamp, "x").utcOffset("+07:00");
function stringWithTimesamp(timestamp, format = 'DD/MM/YYYY - HH:mm') {
const time = moment_1.default(timestamp, 'x').utcOffset('+07:00');
return time.format(format);
}
function stringFromTimeStamp(timestamp, format) {
return stringWithTimesamp(timestamp, format);
}
function convertFormat(dateString, fromFormat, toFormat) {

@@ -17,3 +20,4 @@ return moment_1.default(dateString, fromFormat).format(toFormat);

stringWithTimesamp,
convertFormat
stringFromTimeStamp,
convertFormat,
};

@@ -14,2 +14,3 @@ import ZPFormat from "./format";

stringWithTimesamp: (timestamp: number, format?: string) => string;
stringFromTimeStamp: (timestamp: number, format: string) => string;
convertFormat: (dateString: string, fromFormat: string, toFormat: string) => string;

@@ -16,0 +17,0 @@ };

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.TimeFormatter = exports.NumberFormatter = exports.ZPDate = exports.ZPTelco = exports.ZPFormat = void 0;
const format_1 = __importDefault(require("./format"));

@@ -8,0 +9,0 @@ exports.ZPFormat = format_1.default;

{
"name": "zalopay-formatters",
"version": "3.0.2",
"version": "3.0.3",
"description": "Provide basic functions process number, text",

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

@@ -1,11 +0,18 @@

import moment from "moment";
import moment from 'moment';
function stringWithTimesamp(
timestamp: number,
format: string = "DD/MM/YYYY - HH:mm"
format: string = 'DD/MM/YYYY - HH:mm'
) {
const time = moment(timestamp, "x").utcOffset("+07:00");
const time = moment(timestamp, 'x').utcOffset('+07:00');
return time.format(format);
}
function stringFromTimeStamp(
timestamp: number,
format: string,
) {
return stringWithTimesamp(timestamp, format);
}
function convertFormat(

@@ -21,3 +28,4 @@ dateString: string,

stringWithTimesamp,
convertFormat
stringFromTimeStamp,
convertFormat,
};
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