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

date-format-parse

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

date-format-parse - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

es/format.d.ts

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## [0.2.2](https://github.com/mengxiong10/date-format-parse/compare/v0.2.1...v0.2.2) (2019-11-10)
### Bug Fixes
* fix the parse types ([35c8ba3](https://github.com/mengxiong10/date-format-parse/commit/35c8ba31fe4b7aed28828236d7adda21d42ffe61))
## [0.2.1](https://github.com/mengxiong10/date-format-parse/compare/v0.2.0...v0.2.1) (2019-11-09)

@@ -2,0 +11,0 @@

7

lib/index.d.ts

@@ -1,4 +0,3 @@

import format from './format';
import parse from './parse';
import { isDate, toDate, isValidDate, getWeek } from './util';
export { format, parse, isDate, toDate, isValidDate, getWeek };
export { default as format } from './format';
export { default as parse } from './parse';
export { isDate, toDate, isValidDate, getWeek } from './util';

@@ -23,2 +23,5 @@ import { Unionize } from 'utility-types';

}
export default function parse(str: string, format: string, options?: any): Date;
export default function parse(str: string, format: string, options?: {
locale?: Locale;
backupDate?: Date;
}): Date;
{
"name": "date-format-parse",
"version": "0.2.1",
"version": "0.2.2",
"description": "Lightweight date format and parse",
"main": "lib/index.js",
"module": "es/index.js",
"files": [
"lib",
"es",
"src"
],
"scripts": {
"build:compile": "babel src --out-dir lib --extensions .ts",
"build:types": "tsc --project tsconfig.types.json --outDir lib",
"build": "npm run lint && npm test && npm run clean && npm run build:compile && npm run build:types",
"build:compile.cjs": "MODULE_TYPE=cjs babel src --out-dir lib --extensions .ts",
"build:compile.es": "babel src --out-dir es --extensions .ts",
"build:types": "tsc --project tsconfig.types.json --outDir lib && tsc --project tsconfig.types.json --outDir es",
"build": "npm run lint && npm test && npm run clean && npm run build:compile.cjs && npm run build:compile.es && npm run build:types",
"test": "jest",

@@ -15,0 +18,0 @@ "cov": "jest --coverage --coverageReporters=text-lcov | coveralls",

@@ -1,5 +0,3 @@

import format from './format';
import parse from './parse';
import { isDate, toDate, isValidDate, getWeek } from './util';
export { format, parse, isDate, toDate, isValidDate, getWeek };
export { default as format } from './format';
export { default as parse } from './parse';
export { isDate, toDate, isValidDate, getWeek } from './util';

@@ -244,3 +244,7 @@ import { Unionize, PickByValue } from 'utility-types';

export default function parse(str: string, format: string, options: any = {}) {
export default function parse(
str: string,
format: string,
options: { locale?: Locale; backupDate?: Date } = {}
) {
try {

@@ -247,0 +251,0 @@ const { locale = defaultLocale, backupDate = new Date() } = options;

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