Skip to content

Commit 6e08db4

Browse files
committed
v1.0.8
1 parent 1591df4 commit 6e08db4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ Convert to string.
169169
> ```typescript
170170
> string(0.5); // "0.5"
171171
> string(true); // "true"
172+
> string(new Date('2025-01-01')); // "2025-01-01T00:00:00.000Z"
172173
> string({ key: 'value' }); // '{"key":"value"}'
173174
> string(['test']); // '["test"]'
174-
> string(new Date('2025-01-01')); // "2025-01-01T00:00:00.000Z"
175175
> string(null); // "null"
176176
> string(undefined); // "undefined"
177177
> ```

src/utils/Typof.util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ export const typof = (value: unknown): Types[] => {
2727

2828
if (value === 'true' || value === 'false') types.push('boolean');
2929

30+
if (isISODate(value)) types.push('date');
31+
3032
if (isObject(value) && !Array.isArray(JSON.parse(value))) types.push('object');
3133

3234
if (isObject(value) && Array.isArray(JSON.parse(value))) types.push('array');
3335

34-
if (isISODate(value)) types.push('date');
35-
3636
if (value === 'null') types.push('null');
3737

3838
if (value === 'undefined') types.push('undefined');

0 commit comments

Comments
 (0)