| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Update lib/cast/bigint.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> | 6 个月前 | |
docs: use lowercase primitive types re #16018 | 6 个月前 | |
style: apply "eol-last" rule | 4 年前 | |
test fixes | 3 年前 | |
fix(cast): reject arrays when casting to Int32 or Double Number([5]) is 5 and Number([]) is 0, so a single-element or empty array reached the fallback Number() coercion in castInt32 and castDouble and silently produced a plausible-looking number instead of throwing a CastError -- unlike castNumber(), which already guards against this with an explicit Array.isArray() check, and unlike castBigInt()/castDecimal128(), whose exhaustive allow-lists never match an array in the first place. Multi-element arrays already threw correctly (Number([5,6]) is NaN), so only the single-element/empty cases were affected. | 1 个月前 | |
fix(cast): reject arrays when casting to Int32 or Double Number([5]) is 5 and Number([]) is 0, so a single-element or empty array reached the fallback Number() coercion in castInt32 and castDouble and silently produced a plausible-looking number instead of throwing a CastError -- unlike castNumber(), which already guards against this with an explicit Array.isArray() check, and unlike castBigInt()/castDecimal128(), whose exhaustive allow-lists never match an array in the first place. Multi-element arrays already threw correctly (Number([5,6]) is NaN), so only the single-element/empty cases were affected. | 1 个月前 | |
fix(cast): replace assert.ok with descriptive Error in castNumber When castNumber receives a non-numeric value (e.g. 'hello', {}), assert.ok(!isNaN(val)) throws a raw AssertionError that surfaces as CastError#reason, exposing an internal implementation detail instead of a human-readable message. Replace with an explicit if/throw that raises a plain Error with a descriptive message. Remove the now-unused require('assert'). | 5 个月前 | |
fix: correct ObjectID -> ObjectId _bsontype in mongodb@5 | 3 年前 | |
docs: use lowercase primitive types re #16018 | 6 个月前 | |
BREAKING CHANGE: remove bson as direct dependency, use mongodb/lib/bson instead Fix #15154 | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 6 个月前 | ||
| 6 个月前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 5 个月前 | ||
| 3 年前 | ||
| 6 个月前 | ||
| 1 年前 |