@sapphire/duration 1.1.0-next.fe9315d.0 β 1.1.0-next.fffd257.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +152 -69
- package/dist/index.global.js +1 -2
- package/dist/index.js +1 -2
- package/dist/index.mjs +1 -0
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
- [Features](#features)
|
|
19
19
|
- [Installation](#installation)
|
|
20
20
|
- [Usage](#usage)
|
|
21
|
-
- [
|
|
21
|
+
- [Human Readable Milliseconds](#human-readable-milliseconds)
|
|
22
|
+
- [Parsing a Duration](#parsing-a-duration)
|
|
23
|
+
- [Serializing a Duration](#serializing-a-duration)
|
|
24
|
+
- [Localizing with Durations](#localizing-with-durations)
|
|
22
25
|
- [Buy us some doughnuts](#buy-us-some-doughnuts)
|
|
23
26
|
- [Contributors β¨](#contributors-%E2%9C%A8)
|
|
24
27
|
|
|
@@ -37,6 +40,143 @@ You can use the following command to install this package, or replace `npm insta
|
|
|
37
40
|
npm install @sapphire/duration
|
|
38
41
|
```
|
|
39
42
|
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
**Note:** While this section uses `require`, the imports match 1:1 with ESM imports. For example `const { Duration } = require('@sapphire/duration')` equals `import { Duration } from '@sapphire/duration'`.
|
|
46
|
+
|
|
47
|
+
### Human Readable Milliseconds
|
|
48
|
+
|
|
49
|
+
Milliseconds are often hard for humans to quickly parse, so it's nice to use
|
|
50
|
+
named enum members to make it easier to read.
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
// Import the Time enum
|
|
54
|
+
const { Time } = require('@sapphire/duration');
|
|
55
|
+
|
|
56
|
+
setTimeout(() => {
|
|
57
|
+
// Do something in half a second
|
|
58
|
+
}, Time.Second / 2 /* 500 */);
|
|
59
|
+
|
|
60
|
+
setTimeout(() => {
|
|
61
|
+
// Do something in 6 hours
|
|
62
|
+
}, Time.Hour * 6 /* 21600000 */);
|
|
63
|
+
|
|
64
|
+
setTimeout(() => {
|
|
65
|
+
// Do something in 1 day
|
|
66
|
+
}, Time.Day /* 86400000 */);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Parsing a Duration
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
// Import the Duration class
|
|
73
|
+
const { Duration } = require('@sapphire/duration');
|
|
74
|
+
|
|
75
|
+
// Create a Duration from a string
|
|
76
|
+
new Duration('1d3h15m3s').offset; // 98103000
|
|
77
|
+
new Duration('1 day, 3h & 15m, some extra characters, and another 3 seconds').offset; // 98103000
|
|
78
|
+
|
|
79
|
+
// The date from now after the specified duration
|
|
80
|
+
new Duration('1d3h15m3s').fromNow;
|
|
81
|
+
|
|
82
|
+
// Or use a specific date
|
|
83
|
+
new Duration('1d3h15m3s').dateFrom(new Date('2020-01-01T00:00:00.000Z'));
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
<details>
|
|
87
|
+
<summary>
|
|
88
|
+
<b>Show all available tokens</b>
|
|
89
|
+
</summary>
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
new Duration('1 nanosecond').offset; // 0.000001
|
|
93
|
+
new Duration('2 nanoseconds').offset; // 0.000002
|
|
94
|
+
new Duration('1 ns').offset; // 0.000001
|
|
95
|
+
|
|
96
|
+
new Duration('1 millisecond').offset; // 1
|
|
97
|
+
new Duration('2 milliseconds').offset; // 2
|
|
98
|
+
new Duration('1 ms').offset; // 1
|
|
99
|
+
|
|
100
|
+
new Duration('1 second').offset; // 1000
|
|
101
|
+
new Duration('2 seconds').offset; // 2000
|
|
102
|
+
new Duration('1 sec').offset; // 1000
|
|
103
|
+
new Duration('2 secs').offset; // 2000
|
|
104
|
+
new Duration('1 s').offset; // 1000
|
|
105
|
+
|
|
106
|
+
new Duration('1 minute').offset; // 60000
|
|
107
|
+
new Duration('2 minutes').offset; // 120000
|
|
108
|
+
new Duration('1 min').offset; // 60000
|
|
109
|
+
new Duration('2 mins').offset; // 120000
|
|
110
|
+
new Duration('1 m').offset; // 60000
|
|
111
|
+
|
|
112
|
+
new Duration('1 hour').offset; // 3600000
|
|
113
|
+
new Duration('2 hours').offset; // 7200000
|
|
114
|
+
new Duration('1 hr').offset; // 3600000
|
|
115
|
+
new Duration('2 hrs').offset; // 7200000
|
|
116
|
+
new Duration('1 h').offset; // 3600000
|
|
117
|
+
|
|
118
|
+
new Duration('1 day').offset; // 86400000
|
|
119
|
+
new Duration('2 days').offset; // 172800000
|
|
120
|
+
new Duration('1 d').offset; // 86400000
|
|
121
|
+
|
|
122
|
+
new Duration('1 week').offset; // 604800000
|
|
123
|
+
new Duration('2 weeks').offset; // 1209600000
|
|
124
|
+
new Duration('1 wk').offset; // 604800000
|
|
125
|
+
new Duration('2 wks').offset; // 1209600000
|
|
126
|
+
new Duration('1 w').offset; // 604800000
|
|
127
|
+
|
|
128
|
+
new Duration('1 month').offset; // 2629800000
|
|
129
|
+
new Duration('2 months').offset; // 5259600000
|
|
130
|
+
new Duration('1 b').offset; // 2629800000
|
|
131
|
+
new Duration('2 mo').offset; // 5259600000
|
|
132
|
+
|
|
133
|
+
new Duration('1 year').offset; // 31557600000
|
|
134
|
+
new Duration('2 years').offset; // 63115200000
|
|
135
|
+
new Duration('1 yr').offset; // 31557600000
|
|
136
|
+
new Duration('2 yrs').offset; // 63115200000
|
|
137
|
+
new Duration('1 y').offset; // 31557600000
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
</details>
|
|
141
|
+
|
|
142
|
+
### Serializing a Duration
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
// Import the DurationFormatter class
|
|
146
|
+
const { DurationFormatter } = require('@sapphire/duration');
|
|
147
|
+
|
|
148
|
+
const formatter = new DurationFormatter();
|
|
149
|
+
|
|
150
|
+
// Serialize a duration
|
|
151
|
+
formatter.format(98103000); // 1 day 3 hours 15 minutes 3 seconds
|
|
152
|
+
formatter.format(-98103000); // -1 day 3 hours 15 minutes 3 seconds
|
|
153
|
+
|
|
154
|
+
// Serialize a duration with specified precision
|
|
155
|
+
formatter.format(98103000, 2); // 1 day 3 hours
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Localizing with Durations
|
|
159
|
+
|
|
160
|
+
```typescript
|
|
161
|
+
// Import the DurationFormatter class
|
|
162
|
+
const { DurationFormatter, TimeTypes } = require('@sapphire/duration');
|
|
163
|
+
|
|
164
|
+
// Create custom unit names
|
|
165
|
+
const units = {
|
|
166
|
+
[TimeTypes.Year]: {
|
|
167
|
+
1: 'aΓ±o',
|
|
168
|
+
DEFAULT: 'aΓ±os'
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
// Create a formatter the custom units
|
|
173
|
+
const formatter = new DurationFormatter(units);
|
|
174
|
+
|
|
175
|
+
// Serialize a duration
|
|
176
|
+
formatter.format(31557600000); // 1 aΓ±o
|
|
177
|
+
formatter.format(63115200000); // 2 aΓ±os
|
|
178
|
+
```
|
|
179
|
+
|
|
40
180
|
## Buy us some doughnuts
|
|
41
181
|
|
|
42
182
|
Sapphire Community is and always will be open source, even if we don't get donations. That being said, we know there are amazing people who may still want to donate just to show their appreciation. Thank you very much in advance!
|
|
@@ -50,71 +190,14 @@ We accept donations through Open Collective, Ko-fi, PayPal, Patreon and GitHub S
|
|
|
50
190
|
| Patreon | [Click Here](https://sapphirejs.dev/patreon) |
|
|
51
191
|
| PayPal | [Click Here](https://sapphirejs.dev/paypal) |
|
|
52
192
|
|
|
53
|
-
## Contributors
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<td align="center"><a href="https://github.com/PyroTechniac"><img src="https://avatars2.githubusercontent.com/u/39341355?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gryffon Bellish</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=PyroTechniac" title="Code">π»</a> <a href="https://github.com/sapphiredev/utilities/pulls?q=is%3Apr+reviewed-by%3APyroTechniac" title="Reviewed Pull Requests">π</a> <a href="https://github.com/sapphiredev/utilities/commits?author=PyroTechniac" title="Tests">β οΈ</a></td>
|
|
65
|
-
<td align="center"><a href="https://github.com/vladfrangu"><img src="https://avatars3.githubusercontent.com/u/17960496?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vlad Frangu</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=vladfrangu" title="Code">π»</a> <a href="https://github.com/sapphiredev/utilities/issues?q=author%3Avladfrangu" title="Bug reports">π</a> <a href="https://github.com/sapphiredev/utilities/pulls?q=is%3Apr+reviewed-by%3Avladfrangu" title="Reviewed Pull Requests">π</a> <a href="#userTesting-vladfrangu" title="User Testing">π</a> <a href="https://github.com/sapphiredev/utilities/commits?author=vladfrangu" title="Tests">β οΈ</a></td>
|
|
66
|
-
<td align="center"><a href="https://github.com/Stitch07"><img src="https://avatars0.githubusercontent.com/u/29275227?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stitch07</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Stitch07" title="Code">π»</a> <a href="#projectManagement-Stitch07" title="Project Management">π</a> <a href="https://github.com/sapphiredev/utilities/commits?author=Stitch07" title="Tests">β οΈ</a></td>
|
|
67
|
-
<td align="center"><a href="https://github.com/apps/depfu"><img src="https://avatars3.githubusercontent.com/in/715?v=4?s=100" width="100px;" alt=""/><br /><sub><b>depfu[bot]</b></sub></a><br /><a href="#maintenance-depfu[bot]" title="Maintenance">π§</a></td>
|
|
68
|
-
<td align="center"><a href="https://github.com/apps/allcontributors"><img src="https://avatars0.githubusercontent.com/in/23186?v=4?s=100" width="100px;" alt=""/><br /><sub><b>allcontributors[bot]</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=allcontributors[bot]" title="Documentation">π</a></td>
|
|
69
|
-
</tr>
|
|
70
|
-
<tr>
|
|
71
|
-
<td align="center"><a href="https://github.com/Nytelife26"><img src="https://avatars1.githubusercontent.com/u/22531310?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tyler J Russell</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Nytelife26" title="Documentation">π</a></td>
|
|
72
|
-
<td align="center"><a href="https://github.com/Alcremie"><img src="https://avatars0.githubusercontent.com/u/54785334?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ivan Lieder</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Alcremie" title="Code">π»</a> <a href="https://github.com/sapphiredev/utilities/issues?q=author%3AAlcremie" title="Bug reports">π</a></td>
|
|
73
|
-
<td align="center"><a href="https://github.com/RealShadowNova"><img src="https://avatars3.githubusercontent.com/u/46537907?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hezekiah Hendry</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=RealShadowNova" title="Code">π»</a> <a href="#tool-RealShadowNova" title="Tools">π§</a></td>
|
|
74
|
-
<td align="center"><a href="https://github.com/Vetlix"><img src="https://avatars.githubusercontent.com/u/31412314?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vetlix</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Vetlix" title="Code">π»</a></td>
|
|
75
|
-
<td align="center"><a href="https://github.com/ethamitc"><img src="https://avatars.githubusercontent.com/u/27776796?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ethan Mitchell</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=ethamitc" title="Documentation">π</a></td>
|
|
76
|
-
<td align="center"><a href="https://github.com/noftaly"><img src="https://avatars.githubusercontent.com/u/34779161?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Elliot</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=noftaly" title="Code">π»</a></td>
|
|
77
|
-
<td align="center"><a href="https://jurien.dev"><img src="https://avatars.githubusercontent.com/u/5418114?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jurien Hamaker</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=jurienhamaker" title="Code">π»</a></td>
|
|
78
|
-
</tr>
|
|
79
|
-
<tr>
|
|
80
|
-
<td align="center"><a href="https://fanoulis.dev/"><img src="https://avatars.githubusercontent.com/u/38255093?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Charalampos Fanoulis</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=cfanoulis" title="Documentation">π</a></td>
|
|
81
|
-
<td align="center"><a href="https://github.com/apps/dependabot"><img src="https://avatars.githubusercontent.com/in/29110?v=4?s=100" width="100px;" alt=""/><br /><sub><b>dependabot[bot]</b></sub></a><br /><a href="#maintenance-dependabot[bot]" title="Maintenance">π§</a></td>
|
|
82
|
-
<td align="center"><a href="https://kaname.netlify.app/"><img src="https://avatars.githubusercontent.com/u/56084970?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kaname</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=kaname-png" title="Code">π»</a></td>
|
|
83
|
-
<td align="center"><a href="https://github.com/nandhagk"><img src="https://avatars.githubusercontent.com/u/62976649?v=4?s=100" width="100px;" alt=""/><br /><sub><b>nandhagk</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/issues?q=author%3Anandhagk" title="Bug reports">π</a></td>
|
|
84
|
-
<td align="center"><a href="https://megatank58.me/"><img src="https://avatars.githubusercontent.com/u/51410502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>megatank58</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=megatank58" title="Code">π»</a></td>
|
|
85
|
-
<td align="center"><a href="https://github.com/UndiedGamer"><img src="https://avatars.githubusercontent.com/u/84702365?v=4?s=100" width="100px;" alt=""/><br /><sub><b>UndiedGamer</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=UndiedGamer" title="Code">π»</a></td>
|
|
86
|
-
<td align="center"><a href="https://github.com/Lioness100"><img src="https://avatars.githubusercontent.com/u/65814829?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Lioness100</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Lioness100" title="Documentation">π</a> <a href="https://github.com/sapphiredev/utilities/commits?author=Lioness100" title="Code">π»</a></td>
|
|
87
|
-
</tr>
|
|
88
|
-
<tr>
|
|
89
|
-
<td align="center"><a href="https://gitlab.com/DavidPH/"><img src="https://avatars.githubusercontent.com/u/44669930?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=DavidPHH" title="Code">π»</a></td>
|
|
90
|
-
<td align="center"><a href="https://github.com/apps/renovate"><img src="https://avatars.githubusercontent.com/in/2740?v=4?s=100" width="100px;" alt=""/><br /><sub><b>renovate[bot]</b></sub></a><br /><a href="#maintenance-renovate[bot]" title="Maintenance">π§</a></td>
|
|
91
|
-
<td align="center"><a href="https://renovate.whitesourcesoftware.com/"><img src="https://avatars.githubusercontent.com/u/25180681?v=4?s=100" width="100px;" alt=""/><br /><sub><b>WhiteSource Renovate</b></sub></a><br /><a href="#maintenance-renovate-bot" title="Maintenance">π§</a></td>
|
|
92
|
-
<td align="center"><a href="https://fc5570.me/"><img src="https://avatars.githubusercontent.com/u/68158483?v=4?s=100" width="100px;" alt=""/><br /><sub><b>FC</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=FC5570" title="Code">π»</a></td>
|
|
93
|
-
<td align="center"><a href="https://github.com/Tokipudi"><img src="https://avatars.githubusercontent.com/u/29551076?v=4?s=100" width="100px;" alt=""/><br /><sub><b>JΓ©rΓ©my de Saint Denis</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Tokipudi" title="Code">π»</a></td>
|
|
94
|
-
<td align="center"><a href="https://github.com/ItsMrCube"><img src="https://avatars.githubusercontent.com/u/25201357?v=4?s=100" width="100px;" alt=""/><br /><sub><b>MrCube</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=ItsMrCube" title="Code">π»</a></td>
|
|
95
|
-
<td align="center"><a href="https://github.com/bitomic"><img src="https://avatars.githubusercontent.com/u/35199700?v=4?s=100" width="100px;" alt=""/><br /><sub><b>bitomic</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=bitomic" title="Code">π»</a></td>
|
|
96
|
-
</tr>
|
|
97
|
-
<tr>
|
|
98
|
-
<td align="center"><a href="https://c43721.dev/"><img src="https://avatars.githubusercontent.com/u/55610086?v=4?s=100" width="100px;" alt=""/><br /><sub><b>c43721</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=c43721" title="Code">π»</a></td>
|
|
99
|
-
<td align="center"><a href="https://commandtechno.com/"><img src="https://avatars.githubusercontent.com/u/68407783?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Commandtechno</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Commandtechno" title="Code">π»</a></td>
|
|
100
|
-
<td align="center"><a href="https://github.com/dhruv-kaushikk"><img src="https://avatars.githubusercontent.com/u/73697546?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aura</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=dhruv-kaushikk" title="Code">π»</a></td>
|
|
101
|
-
<td align="center"><a href="https://axis.moe/"><img src="https://avatars.githubusercontent.com/u/54381371?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jonathan</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=axisiscool" title="Code">π»</a></td>
|
|
102
|
-
<td align="center"><a href="https://github.com/imranbarbhuiya"><img src="https://avatars.githubusercontent.com/u/74945038?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Parbez</b></sub></a><br /><a href="#maintenance-imranbarbhuiya" title="Maintenance">π§</a></td>
|
|
103
|
-
<td align="center"><a href="https://github.com/NotKaskus"><img src="https://avatars.githubusercontent.com/u/75168528?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Paul Andrew</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=NotKaskus" title="Documentation">π</a></td>
|
|
104
|
-
<td align="center"><a href="https://linktr.ee/mzato0001"><img src="https://avatars.githubusercontent.com/u/62367547?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mzato</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Mzato0001" title="Code">π»</a> <a href="https://github.com/sapphiredev/utilities/issues?q=author%3AMzato0001" title="Bug reports">π</a></td>
|
|
105
|
-
</tr>
|
|
106
|
-
<tr>
|
|
107
|
-
<td align="center"><a href="https://github.com/MajesticString"><img src="https://avatars.githubusercontent.com/u/66224939?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Harry Allen</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=MajesticString" title="Documentation">π</a></td>
|
|
108
|
-
<td align="center"><a href="https://github.com/EvolutionX-10"><img src="https://avatars.githubusercontent.com/u/85353424?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Evo</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=EvolutionX-10" title="Code">π»</a></td>
|
|
109
|
-
<td align="center"><a href="https://enes.ovh/"><img src="https://avatars.githubusercontent.com/u/61084101?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Enes GenΓ§</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=enxg" title="Code">π»</a></td>
|
|
110
|
-
<td align="center"><a href="https://github.com/muchnameless"><img src="https://avatars.githubusercontent.com/u/12682826?v=4?s=100" width="100px;" alt=""/><br /><sub><b>muchnameless</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=muchnameless" title="Code">π»</a></td>
|
|
111
|
-
<td align="center"><a href="https://github.com/r-priyam"><img src="https://avatars.githubusercontent.com/u/50884372?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Priyam</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=r-priyam" title="Code">π»</a></td>
|
|
112
|
-
</tr>
|
|
113
|
-
</table>
|
|
114
|
-
|
|
115
|
-
<!-- markdownlint-restore -->
|
|
116
|
-
<!-- prettier-ignore-end -->
|
|
117
|
-
|
|
118
|
-
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
119
|
-
|
|
120
|
-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
|
193
|
+
## Contributors
|
|
194
|
+
|
|
195
|
+
Please make sure to read the [Contributing Guide][contributing] before making a pull request.
|
|
196
|
+
|
|
197
|
+
Thank you to all the people who already contributed to Sapphire!
|
|
198
|
+
|
|
199
|
+
<a href="https://github.com/sapphiredev/utilities/graphs/contributors">
|
|
200
|
+
<img src="https://contrib.rocks/image?repo=sapphiredev/utilities" />
|
|
201
|
+
</a>
|
|
202
|
+
|
|
203
|
+
[contributing]: https://github.com/sapphiredev/.github/blob/main/.github/CONTRIBUTING.md
|
package/dist/index.global.js
CHANGED
|
@@ -187,9 +187,8 @@ var SapphireDuration = (function (exports) {
|
|
|
187
187
|
exports.Time = Time;
|
|
188
188
|
exports.TimeTypes = TimeTypes;
|
|
189
189
|
|
|
190
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
191
|
-
|
|
192
190
|
return exports;
|
|
193
191
|
|
|
194
192
|
})({});
|
|
193
|
+
//# sourceMappingURL=out.js.map
|
|
195
194
|
//# sourceMappingURL=index.global.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var __defProp = Object.defineProperty;
|
|
6
4
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
5
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
@@ -187,4 +185,5 @@ exports.Duration = Duration;
|
|
|
187
185
|
exports.DurationFormatter = DurationFormatter;
|
|
188
186
|
exports.Time = Time;
|
|
189
187
|
exports.TimeTypes = TimeTypes;
|
|
188
|
+
//# sourceMappingURL=out.js.map
|
|
190
189
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sapphire/duration",
|
|
3
|
-
"version": "1.1.0-next.
|
|
3
|
+
"version": "1.1.0-next.fffd257.0",
|
|
4
4
|
"description": "A time duration utility library for JavaScript.",
|
|
5
5
|
"author": "@sapphire",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@favware/cliff-jumper": "^1.
|
|
61
|
-
"@vitest/coverage-c8": "^0.
|
|
62
|
-
"tsup": "^6.
|
|
63
|
-
"typedoc": "^0.23.
|
|
64
|
-
"typedoc-json-parser": "^
|
|
65
|
-
"typescript": "^4.
|
|
66
|
-
"vitest": "^0.
|
|
60
|
+
"@favware/cliff-jumper": "^1.10.0",
|
|
61
|
+
"@vitest/coverage-c8": "^0.27.1",
|
|
62
|
+
"tsup": "^6.5.0",
|
|
63
|
+
"typedoc": "^0.23.24",
|
|
64
|
+
"typedoc-json-parser": "^7.1.0",
|
|
65
|
+
"typescript": "^4.9.4",
|
|
66
|
+
"vitest": "^0.27.1"
|
|
67
67
|
}
|
|
68
68
|
}
|