Commit graph

54 commits

Author SHA1 Message Date
Martin Eneqvist
5565c5e3ba
Fix passing in assertion message to assertArray (#210)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2024-09-06 22:52:56 +07:00
Sindre Sorhus
0ff273fee8 Require Node.js 18 2024-07-10 15:41:12 +02:00
Martin Eneqvist
25a376875d
Fix type guard for isWhitespaceString and isEmptyStringOrWhitespace (#207) 2024-06-26 14:31:56 +02:00
Bjorn Stromberg
8cbcaee674
Remove deprecated methods and improve Class definition (#209) 2024-06-26 14:30:00 +02:00
Bjorn Stromberg
92699e1049
Replace ts-node with tsimp (#208) 2024-06-25 02:08:48 +02:00
Martin Eneqvist
f2e5834421
Support custom assertion messages (#204)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2024-04-23 12:58:28 +07:00
Martin Eneqvist
e9418fe1b9
Add .validDate() (#203) 2024-02-29 14:23:30 +07:00
Sindre Sorhus
e7e2213e91 directInstanceOf: Fix handling of undefined and null
Fixes #199
2023-10-15 16:01:29 +07:00
Bjorn Stromberg
bcec30d735
Rename is.domElement() to is.htmlElement() (#196) 2023-08-10 16:06:46 +02:00
Bjorn Stromberg
85c89925b6
Give better assertion messages for assert.all and assert.any (#193) 2023-08-09 13:49:06 +02:00
Bjorn Stromberg
5044c91273
Implement named exports (#191) 2023-08-07 02:50:03 +02:00
Bjorn Stromberg
bd5dfda993
Replace enums with string literals (#190) 2023-07-30 13:32:34 +02:00
Tal Michel
3868f47783
Add .tupleLike() (#189)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2023-07-23 14:35:23 +02:00
Eugene
20ad8231c2
Fix is.nonEmptyArray() type narrowing with undefined (#188) 2023-07-17 11:42:04 +02:00
hyperbola
9d26c020ee
Fix type guards for assert.{truthy,falsy,nan} (#187) 2023-07-16 16:19:31 +02:00
Eugene
1284da085f
Add is.positiveNumber and is.negativeNumber (#184) 2023-07-15 00:26:30 +02:00
Eugene
3177d11801
Fix type narrowing for nonEmptyArray (#185) 2023-07-15 00:24:56 +02:00
Sindre Sorhus
9265e9072d Add test for #183 2023-06-10 11:43:41 +03:00
Sindre Sorhus
65404fbd8e Meta tweaks 2023-05-30 21:15:24 +07:00
Sindre Sorhus
e559b37b72 Update dev dependencies 2022-10-17 18:19:38 +07:00
Sindre Sorhus
f3693674f6 Add failing test for #174 2022-10-17 17:51:49 +07:00
Eric(书生)
e503a9ec49
Add .weakRef() (#165)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2022-06-13 14:05:26 +07:00
Sindre Sorhus
d6fc1ce0fe Require Node.js 14, TS 4.7, and move to ESM (#167) 2022-06-11 17:44:43 +07:00
Filip Skokan
c408f5a268
Fix NaN detection in .is() (#159) 2022-06-10 00:05:31 +07:00
Eric(书生)
5b7ea154e6
Add .isBlob() (#162)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2022-02-27 14:16:25 +07:00
Sindre Sorhus
6cbefb9af7 Meta tweaks 2022-02-25 16:19:29 +07:00
Ivan Katliarchuk
23cf074a73
Add .nonEmptyStringAndNotWhitespace() (#161)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2022-02-25 16:10:57 +07:00
Olivier Beaulieu
a5b4017d5e
Add is.enumCase and assert.enumCase (#150)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2022-01-17 12:55:40 +07:00
Kayson Wu
a8de3d6f34
Add is.formData and is.urlSearchParams (#139) 2021-09-13 21:25:44 +07:00
PopGoesTheWza
d2f98e472d
Add is.propertyKey (#138)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Giora Guttsait <giora111@gmail.com>
2021-09-10 15:26:13 +07:00
Dave Cohen
b748ab72b6
Fix assertion message for .all and .any (#132) 2021-04-22 16:00:08 +07:00
Arnovsky
d8ced89efe
Fix using is.array in is.all (#125) 2020-08-22 00:18:34 +02:00
Arnovsky
3f93bf200d
Add is.array overload that supports asserting array items (#119)
Co-authored-by: Pedro Augusto de Paula Barbosa <papb1996@gmail.com>
Co-authored-by: Giora Guttsait <giora111@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2020-07-25 09:11:59 +02:00
Bjorn Stromberg
71ca1e5573
Make the is() function type-safe (#117) 2020-06-28 04:20:36 +08:00
Bjorn Stromberg
1ffe2fb6a7
Use string literals instead of enums (#113) 2020-06-20 15:28:47 +08:00
Arfat Salman
402fbb5a7e
Fix #109: is.numericString behaves correctly on whitespaces (#110) 2020-04-17 17:55:02 -04:00
Sindre Sorhus
05cdaccf92 Update TypeScript 2020-02-22 02:17:02 +07:00
Dave Cohen
d1929ad47c
Add support for multiple predicates to is.any (#104) 2020-02-16 20:06:19 -05:00
Forresst
446a7a081e
Add .asyncGenerator and .asyncGeneratorFunction detection (#100) 2020-01-30 00:35:58 +07:00
Sindre Sorhus
11003b925e Meta tweaks 2020-01-22 19:17:43 +07:00
Joel Purra
0c3f110386 Add assertion type guards (#97) 2020-01-22 18:08:35 +07:00
Joel Purra
c842cc260f Upgrade dependencies (#101) 2020-01-21 23:56:44 +07:00
Sindre Sorhus
c25b606c3b Improve the type assertion for is.asyncFunction 2019-11-07 16:37:36 +07:00
Sindre Sorhus
af6b03d67f Require Node.js 10 2019-11-07 15:58:29 +07:00
Kai Niedziela
f04dffa575 Make is.number(NaN) return false (#90)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2019-06-30 15:09:07 +07:00
Sindre Sorhus
ffc6ce4586 Fix linting 2019-06-15 02:12:31 +07:00
Sindre Sorhus
04cd282265 Fix the capitalization of is.bigInt64Array and is.bigUint64Array 2019-05-13 11:04:48 +07:00
Sindre Sorhus
2dac8e96f4 Meta tweaks 2019-05-04 16:11:43 +07:00
Vlad Frangu
dd2a91dce5 Add support for BigInt (#87) 2019-05-04 16:05:23 +07:00
Adam Babcock
373605e40d Test coverage for is(value) (#86) 2019-04-28 15:15:11 +07:00