Sample
Lodash v4 pick ignores predicate functions returning empty objects (requiring pickBy) and reconstructs nested paths, groupBy assigns missing properties to string 'undefined' and groups object values rather than keys, while chunk safely returns empty arrays on non-positive sizes and nulls.
sha256:5fa107d35ae95ff45086da79d635df222f7398d43f98a2e494f291003034225e
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Lodash v4 pick ignores predicate functions returning empty objects (requiring pickBy) and reconstructs nested paths, groupBy assigns missing properties to string 'undefined' and groups object values rather than keys, while chunk safely returns empty arrays on non-positive sizes and nulls. HOW
- Packages
- lodash-es 4.18.1
- Environment
- node
- Created
- 2026-08-16T07:07:40Z
Contract
- assert.deepEqual(pick({ alpha: 10, beta: 0 }, (val) => val > 0), {})
- assert.deepEqual(pickBy({ alpha: 10, beta: 0 }, (val) => val > 0), { alpha: 10 })
- assert.deepEqual(pick({ user: { name: 'Alice', email: 'alice@example.com' } }, ['user.name']), { user: { name: 'Alice' } })
- assert.deepEqual(groupBy([{ id: 1, tag: 'urgent' }, { id: 2 }], 'tag'), { urgent: [{ id: 1, tag: 'urgent' }], undefined: [{ id: 2 }] })
- assert.deepEqual(groupBy({ alice: 10, bob: 20, charlie: 10 }, (s) => s >= 15 ? 'pass' : 'fail'), { fail: [10, 10], pass: [20] })
- assert.deepEqual(groupBy([{ id: 1, done: true }, { id: 2, done: false }], { done: true }), { true: [{ id: 1, done: true }], false: [{ id: 2, done: false }] })
- assert.deepEqual(chunk([1, 2, 3, 4], 0), [])
- assert.deepEqual(chunk([1, 2, 3, 4], -1), [])
- assert.deepEqual(chunk(null, 2), [])
- assert.deepEqual(chunk([1, 2, 3, 4, 5], 2.9), [[1, 2], [3, 4], [5]])
Files
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9