date-format-parse
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -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 @@ |
@@ -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; |
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
209079
320
4214