Buckets:
| module.exports = match | |
| /** | |
| * match is a bare-bones object shape matcher. We should be able to replace | |
| * this with `assert.partialDeepStrictEqual` when v22 is our minimum. | |
| * | |
| * @param {object} found | |
| * @param {object} expected | |
| */ | |
| function match (found, expected, { assert = require('node:assert') } = {}) { | |
| for (const [key, value] of Object.entries(expected)) { | |
| if (Object.prototype.toString.call(value) === '[object Object]') { | |
| match(found[key], value) | |
| continue | |
| } | |
| if (value !== found[key]) { | |
| throw Error(`expected "${value}" but found "${found[key]}"`) | |
| } | |
| } | |
| assert.ok('passed') | |
| } | |
Xet Storage Details
- Size:
- 639 Bytes
- Xet hash:
- e0ef8e099be54ccb44ccd1c3d3f3964aa0baec670e83427770a337897aeadea4
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.