{"_id":"@cjser/filter-obj__v5_1_0","name":"@cjser/filter-obj__v5_1_0","dist-tags":{"latest":"5.1.0-cjser.2"},"versions":{"5.1.0-cjser.2":{"name":"@cjser/filter-obj__v5_1_0","version":"5.1.0-cjser.2","description":"Filter object keys and values into a new object","license":"MIT","repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"require":"./dist-cjser/index.cjs","default":"./index.js"},"types":"./index.d.ts","engines":{"node":">=14.16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["filter","object","key","keys","value","values","iterate","iterator","include","exclude","pick","omit"],"devDependencies":{"ava":"^4.3.1","tsd":"^0.22.0","xo":"^0.51.0"},"main":"./dist-cjser/index.cjs","cjser":{"sourceVersion":"5.1.0","cjserVersion":2,"original":{"name":"filter-obj","version":"5.1.0","exports":"./index.js","repository":"sindresorhus/filter-obj","files":["index.js","index.d.ts"],"scripts":{"test":"xo && ava && tsd"}}},"_id":"@cjser/filter-obj__v5_1_0@5.1.0-cjser.2","gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-DI2sLpq1Zb0mPIv1/PnDazzRgCtiRpXso+wqVE/MK1risebuGXd1q8VuRvDNxO/oU8qpRX7sgSQFfNRjV0WJDA==","shasum":"69a5be25f75174bf184260049d08a8f6570c2ed8","tarball":"https://registry.npmjs.org/@cjser/filter-obj__v5_1_0/-/filter-obj__v5_1_0-5.1.0-cjser.2.tgz","fileCount":6,"unpackedSize":8978,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD9U3KRAV53AUmjU/VLPGYO2P0h7JM8P1+aiSnWt3rjBgIgb3OfBzt9Q8f/xRfYGJpu8A9txtBzKPVtpGPyqb0r+tk="}]},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/filter-obj__v5_1_0_5.1.0-cjser.2_1778158121271_0.754500344521448"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T12:48:41.188Z","5.1.0-cjser.2":"2026-05-07T12:48:41.418Z","modified":"2026-05-07T12:48:41.648Z"},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"description":"Filter object keys and values into a new object","keywords":["filter","object","key","keys","value","values","iterate","iterator","include","exclude","pick","omit"],"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","readme":"# filter-obj\n\n> Filter object keys and values into a new object\n\n## Install\n\n```sh\nnpm install filter-obj\n```\n\n## Usage\n\n```js\nimport {includeKeys, excludeKeys} from 'filter-obj';\n\nconst object = {\n\tfoo: true,\n\tbar: false\n};\n\nconst newObject = includeKeys(object, (key, value) => value === true);\n//=> {foo: true}\n\nconst newObject2 = includeKeys(object, ['bar']);\n//=> {bar: false}\n\nconst newObject = excludeKeys(object, (key, value) => value === true);\n//=> {bar: false}\n\nconst newObject3 = excludeKeys(object, ['bar']);\n//=> {foo: true}\n```\n\n## API\n\n### includeKeys(source, filter)\n### includeKeys(source, keys)\n### excludeKeys(source, filter)\n### excludeKeys(source, keys)\n\n#### source\n\nType: `object`\n\nThe source object to filter properties from.\n\n#### filter\n\nType: `(sourceKey: string | symbol, sourceValue: unknown, source: object) => boolean`\n\nA predicate function that determines whether a property should be filtered.\n\n#### keys\n\nType: `Array<string | symbol>`\n\nAn array of property keys to be filtered.\n\n## Related\n\n- [map-obj](https://github.com/sindresorhus/map-obj) - Map object keys and values into a new object\n\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/sindresorhus/filter-obj\n","readmeFilename":"readme.md","_rev":"1-22f5b4c08b9582709d4eeeed8d31f6ee"}