{"name":"lowercase-keys","version":"4.0.1","description":"Lowercase the keys of an object","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/lowercase-keys.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava && tsd"},"keywords":["object","assign","extend","properties","lowercase","lower-case","case","keys","key"],"devDependencies":{"ava":"^6.4.1","tsd":"^0.33.0","xo":"^1.2.3"},"gitHead":"ad1f8f14777d2f27d516005d62f88e918eb656e5","types":"./index.d.ts","_id":"lowercase-keys@4.0.1","bugs":{"url":"https://github.com/sindresorhus/lowercase-keys/issues"},"homepage":"https://github.com/sindresorhus/lowercase-keys#readme","_nodeVersion":"25.3.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-wI9Nui/L8VfADa/cr/7NQruaASk1k23/Uh1khQ02BCVYiiy8F4AhOGnQzJy3Fl/c44GnYSbZHv8g7EcG3kJ1Qg==","shasum":"03f169f2bfc01709582366ede4f58d79ab6e766b","tarball":"http://registry-npm.ywwl.com/lowercase-keys/download/lowercase-keys-4.0.1.tgz","fileCount":5,"unpackedSize":5054,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC32DHZ62rzQ6Yx9W31sJRNdExtoEi1yvJVx/Re8iuXYwIgcx4ANX7VjVvr0s0uHkJEE5j+ClcoxONXuJfSSrWNg/s="}],"size":2206,"noattachment":false,"key":"/lowercase-keys/-/lowercase-keys-4.0.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lowercase-keys_4.0.1_1770057934863_0.6815968200709253"},"_hasShrinkwrap":false,"readme":"# lowercase-keys\n\n> Lowercase the keys of an object\n\nCheck out [`map-obj`](https://github.com/sindresorhus/map-obj) if you need support for deep iteration.\n\n## Install\n\n```sh\nnpm install lowercase-keys\n```\n\n## Usage\n\n```js\nimport lowercaseKeys from 'lowercase-keys';\n\nlowercaseKeys({FOO: true, bAr: false});\n//=> {foo: true, bar: false}\n```\n\n## API\n\n### lowercaseKeys(object, options?)\n\nReturns a new object with the keys lowercased.\n\n#### options\n\nType: `object`\n\n##### onConflict\n\nType: `Function`\n\nA function that is called when multiple keys in the input object map to the same lowercased key.\n\nThe function receives the lowercased key, the new value, and the existing value, and should return the value to use.\n\nBy default, the last value wins.\n\n```js\nimport lowercaseKeys from 'lowercase-keys';\n\n// Throw on conflict\nlowercaseKeys({Key: 'value1', key: 'value2'}, {\n\tonConflict({key}) {\n\t\tthrow new Error(`Duplicate key: ${key}`);\n\t}\n});\n\n// Keep the first value\nlowercaseKeys({Key: 'value1', key: 'value2'}, {\n\tonConflict: ({existingValue}) => existingValue,\n});\n//=> {key: 'value1'}\n```\n","publish_time":1770057935003,"_cnpm_publish_time":1770057935003,"dist-tags":{"latest":"4.0.1"}}