typings
This commit is contained in:
parent
7245651cda
commit
2c5af27763
@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 6.0.2
|
||||||
|
|
||||||
|
- TS typings
|
||||||
|
|
||||||
|
## 6.0.1
|
||||||
|
|
||||||
|
- Added `mo` as a shorthand for month
|
||||||
|
|
||||||
## 6.0.0
|
## 6.0.0
|
||||||
|
|
||||||
- Drop support for Node.js `< 8.0.0`
|
- Drop support for Node.js `< 8.0.0`
|
||||||
|
6154
package-lock.json
generated
6154
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
"types:": "timestring.d.ts",
|
||||||
"name": "@navy.gif/timestring",
|
"name": "@navy.gif/timestring",
|
||||||
"version": "6.0.1",
|
"version": "6.0.2",
|
||||||
"description": "Parse a human readable time string into a time based value",
|
"description": "Parse a human readable time string into a time based value",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -31,6 +32,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
"coveralls": "^3.0.6",
|
"coveralls": "^3.0.6",
|
||||||
|
"dts-gen": "^0.6.0",
|
||||||
"istanbul": "^0.4.5",
|
"istanbul": "^0.4.5",
|
||||||
"mocha": "^7.0.1",
|
"mocha": "^7.0.1",
|
||||||
"mocha-lcov-reporter": "1.3.0",
|
"mocha-lcov-reporter": "1.3.0",
|
||||||
|
23
timestring.d.ts
vendored
Normal file
23
timestring.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/** Declaration file generated by dts-gen */
|
||||||
|
|
||||||
|
export = timestring;
|
||||||
|
|
||||||
|
type ReturnUnit =
|
||||||
|
'ms' |
|
||||||
|
's' |
|
||||||
|
'm' |
|
||||||
|
'h' |
|
||||||
|
'd' |
|
||||||
|
'w' |
|
||||||
|
'th' |
|
||||||
|
'y'
|
||||||
|
|
||||||
|
type TimestringOptions = {
|
||||||
|
hoursPerDay: number
|
||||||
|
daysPerWeek: number
|
||||||
|
weeksPerMonth: number
|
||||||
|
monthsPerYear: number
|
||||||
|
daysPerYear: number
|
||||||
|
}
|
||||||
|
|
||||||
|
declare function timestring(string: string, returnUnit: ReturnUnit, opts: TimestringOptions): any;
|
Loading…
Reference in New Issue
Block a user