Simon Podlipsky
ab4a3e99a0
feat: ensure there's at least 1 char in non-empty string
...
This is useful e.g. when trying to leverage a non-empty string for accessing its first character. We can say there's always at least 1 char in non-empty string so this allows us to do `s[0]` with ts option `noUncheckedIndexedAccess: true`.
2023-10-26 14:57:15 +02:00
Sindre Sorhus
f10e2caf3d
6.0.1
2023-10-15 19:26:47 +07:00
Sindre Sorhus
e7e2213e91
directInstanceOf: Fix handling of undefined and null
...
Fixes #199
2023-10-15 16:01:29 +07:00
Bjorn Stromberg
9d6c91ee58
Add Node.js 20 to CI ( #181 )
2023-08-16 12:09:57 +02:00
Sindre Sorhus
877ed1cc6a
6.0.0
2023-08-15 20:51:44 +02:00
Sindre Sorhus
dadca59f6a
Update dev dependencies
2023-08-15 20:50:56 +02:00
Bjorn Stromberg
68e0c95857
Update @sindresorhus/tsconfig to v4 ( #194 )
2023-08-10 16:07:56 +02:00
Bjorn Stromberg
bcec30d735
Rename is.domElement() to is.htmlElement() ( #196 )
2023-08-10 16:06:46 +02:00
Bjorn Stromberg
ee79af32b6
Update class method description ( #195 )
...
Co-authored-by: Harminder Virk <virk.officials@gmail.com>
2023-08-10 16:05:22 +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
e03c249d6c
Drop support for Node.js 14 ( #192 )
2023-08-07 17:18:36 +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
Sindre Sorhus
44beb083a3
5.6.0
2023-07-23 14:40:00 +02:00
Tal Michel
3868f47783
Add .tupleLike() ( #189 )
...
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2023-07-23 14:35:23 +02:00
Sindre Sorhus
94dc715577
5.5.2
2023-07-17 11:42:55 +02:00
Eugene
20ad8231c2
Fix is.nonEmptyArray() type narrowing with undefined ( #188 )
2023-07-17 11:42:04 +02:00
Sindre Sorhus
ad0c3b1429
5.5.1
2023-07-16 16:20:29 +02:00
hyperbola
9d26c020ee
Fix type guards for assert.{truthy,falsy,nan} ( #187 )
2023-07-16 16:19:31 +02:00
Sindre Sorhus
278e0e9696
5.5.0
2023-07-15 00:28:14 +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
7d468191f4
5.4.1
2023-06-04 11:04:07 +03:00
Bjorn Stromberg
d1574d358d
Revert exports change in package.json ( #180 )
2023-06-04 11:01:35 +03:00
Sindre Sorhus
61a437eba3
5.4.0
2023-05-30 21:16:59 +07:00
Sindre Sorhus
65404fbd8e
Meta tweaks
2023-05-30 21:15:24 +07:00
Xananax
888e145c5a
Improve type guard/assertion of numericString() ( #178 )
2023-05-30 18:43:51 +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
Sindre Sorhus
911f44dc36
5.3.0
2022-07-21 16:30:26 +02:00
Sindre Sorhus
33cd815503
Meta tweaks
2022-07-21 16:28:44 +02:00
Sindre Sorhus
592d9093cd
Make nonEmptyArray() more strongly-typed
...
Fixes #171
2022-07-21 16:28:43 +02:00
Sindre Sorhus
d3ff1fdfce
5.2.0
2022-06-21 14:07:38 +02:00
ehmicky
45cae31f4d
Improve plainObject() ( #169 )
2022-06-21 14:05:40 +02:00
Sindre Sorhus
dc99f7cd4a
5.1.0
2022-06-13 14:07:07 +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
06d217f70c
5.0.1
2022-06-11 18:28:13 +07:00
Sindre Sorhus
ac7c567c2b
Fix typo
2022-06-11 18:27:36 +07:00
Sindre Sorhus
778c5da5b3
5.0.0
2022-06-11 18:19:55 +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
Sindre Sorhus
65ea91297e
4.6.0
2022-02-27 14:21:30 +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
Sindre Sorhus
dc2dc9a438
4.5.0
2022-02-25 16:16:30 +07:00
Ivan Katliarchuk
23cf074a73
Add .nonEmptyStringAndNotWhitespace() ( #161 )
...
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2022-02-25 16:10:57 +07:00
Sindre Sorhus
04ccf21dba
Document TypeScript naming limitation
...
Fixes #157
2022-02-01 11:37:28 +07:00
Sindre Sorhus
c3d12667fd
4.4.0
2022-01-25 17:29:45 +07:00
Zane Shannon
63d75d68ee
Add type guard for is.truthy and is.falsy ( #151 )
2022-01-25 17:28:33 +07:00