{"_id":"@divyeshpandav/convert-label-value","_rev":"3-1f970143470885da286c2cda2f07b377","name":"@divyeshpandav/convert-label-value","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.1":{"name":"@divyeshpandav/convert-label-value","version":"1.0.1","keywords":["convert","label","value","options","utility"],"author":{"name":"Divyesh"},"license":"MIT","_id":"@divyeshpandav/convert-label-value@1.0.1","maintainers":[{"name":"divyeshpandav","email":"divyeshp.codezee@gmail.com"}],"homepage":"https://github.com/divyeshpcodezee-tech/convert-label-value#readme","bugs":{"url":"https://github.com/divyeshpcodezee-tech/convert-label-value/issues"},"dist":{"shasum":"1b3400aebce79662983e48d3e49fbc582be6db99","tarball":"https://registry.npmjs.org/@divyeshpandav/convert-label-value/-/convert-label-value-1.0.1.tgz","fileCount":3,"integrity":"sha512-FL3DPsrXgB+IWDkMRhyUG5lWyXVJK/8JyGxUoeAgM4o/TdI3SrmKXv7c9AePROSVyZvjfGJkU+qtgwTui1jVVA==","signatures":[{"sig":"MEYCIQCZBIDfH1hyeHhRvi5V3248gQyObWd+2HFhl9BG0nbDEQIhAJEbSLGVZZTMhJYgmbKJWLMpNBo/40wrDcDtg2+sq8uv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2135},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"313a92b1e0c67de22b8c44b42538019d2f11dde3","scripts":{"test":"node ./dist/example-test.js || true","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"divyeshpandav","email":"divyeshp.codezee@gmail.com"},"repository":{"url":"git+https://github.com/divyeshpcodezee-tech/convert-label-value.git","type":"git"},"_npmVersion":"10.9.3","description":"Small util to convert arrays into {label, value} options","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/convert-label-value_1.0.1_1759213827786_0.052687920987560144","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@divyeshpandav/convert-label-value","version":"1.0.2","keywords":["convert","label","value","options","utility"],"author":{"name":"Divyesh"},"license":"MIT","_id":"@divyeshpandav/convert-label-value@1.0.2","maintainers":[{"name":"divyeshpandav","email":"divyeshp.codezee@gmail.com"}],"homepage":"https://github.com/divyeshpcodezee-tech/convert-label-value#readme","bugs":{"url":"https://github.com/divyeshpcodezee-tech/convert-label-value/issues"},"dist":{"shasum":"1e02be03c4ada1922e440f3c394a1ba748fe9ecc","tarball":"https://registry.npmjs.org/@divyeshpandav/convert-label-value/-/convert-label-value-1.0.2.tgz","fileCount":4,"integrity":"sha512-LPhW+sXqerI22zYMmjiAnfxccJl1YTOWVssqALLVoSs7L+plKnrJ9jgw737VjDBGavw0Bhnv/bZfV826tHs9Qw==","signatures":[{"sig":"MEQCIF59YHMfvvH581+hveWoI6EAfEcaTySc5Zcnc7asTF/0AiBpA311y9nf+m9bvjCAfYdmajOFkZclGgWaSlNKhPtNSg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3217},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"ebd34adc83f825fcb463c606048483583650ebda","scripts":{"test":"node ./dist/example-test.js || true","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"divyeshpandav","email":"divyeshp.codezee@gmail.com"},"repository":{"url":"git+https://github.com/divyeshpcodezee-tech/convert-label-value.git","type":"git"},"_npmVersion":"10.9.3","description":"Small util to convert arrays into {label, value} options","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/convert-label-value_1.0.2_1759214253909_0.5835758206547772","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@divyeshpandav/convert-label-value","version":"1.0.3","description":"Small util to convert arrays into {label, value} options","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","test":"node ./dist/example-test.js || true"},"keywords":["convert","label","value","options","utility"],"author":{"name":"Divyesh"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/divyeshpcodezee-tech/convert-label-value.git"},"bugs":{"url":"https://github.com/divyeshpcodezee-tech/convert-label-value/issues"},"homepage":"https://github.com/divyeshpcodezee-tech/convert-label-value#readme","_id":"@divyeshpandav/convert-label-value@1.0.3","gitHead":"ba56e0f3731f970f5521e2a129fb3ce95fabd6f7","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-Figlv2I8V9hJP6G12R8kWcj1bWJ8XTDb//IDVQbsX4sky1LWAlkIKsXN/5e6ZHDCqbSks43HQNA+MHMi/HyxQw==","shasum":"974ede06b3321e54f059327c0b7883f535bac299","tarball":"https://registry.npmjs.org/@divyeshpandav/convert-label-value/-/convert-label-value-1.0.3.tgz","fileCount":4,"unpackedSize":3203,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDXvocXF9POjaImJbHE4eh5Sj29E/npHvEjzwO5RpkulAIhAOP5xLt3h4xktSVFBvFuDEEDgpRIQj5QOX/qpz6JKhUP"}]},"_npmUser":{"name":"divyeshpandav","email":"divyeshp.codezee@gmail.com"},"directories":{},"maintainers":[{"name":"divyeshpandav","email":"divyeshp.codezee@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/convert-label-value_1.0.3_1759214401183_0.9944183887882343"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-30T06:30:27.729Z","modified":"2025-09-30T06:40:01.584Z","1.0.1":"2025-09-30T06:30:27.973Z","1.0.2":"2025-09-30T06:37:34.095Z","1.0.3":"2025-09-30T06:40:01.410Z"},"bugs":{"url":"https://github.com/divyeshpcodezee-tech/convert-label-value/issues"},"author":{"name":"Divyesh"},"license":"MIT","homepage":"https://github.com/divyeshpcodezee-tech/convert-label-value#readme","keywords":["convert","label","value","options","utility"],"repository":{"type":"git","url":"git+https://github.com/divyeshpcodezee-tech/convert-label-value.git"},"description":"Small util to convert arrays into {label, value} options","maintainers":[{"name":"divyeshpandav","email":"divyeshp.codezee@gmail.com"}],"readme":"A tiny utility to convert arrays of strings or objects into `{ label, value }` options — perfect for dropdowns, selects, or any UI component that expects options.\n\n---\n\n## Installation\n\n```bash\nnpm install @divyeshpandav/convert-label-value\n# or\nyarn add @divyeshpandav/convert-label-value\n```\n\n## Usage Example\n\n```ts\nimport coverLabelValue from \"@divyeshpandav/convert-label-value\";\n\n// Example 1: Array of strings\nconst fruits = [\"apple\", \"banana\", \"orange\"];\nconst optionsFromStrings = coverLabelValue({ data: fruits });\nconsole.log(optionsFromStrings);\n// [\n//   { label: 'Apple', value: 'apple' },\n//   { label: 'Banana', value: 'banana' },\n//   { label: 'Orange', value: 'orange' }\n// ]\n\n// Example 2: Array of objects\nconst items = [\n  { name: \"apple\", id: 1 },\n  { name: \"banana\", id: 2 },\n];\nconst optionsFromObjects = coverLabelValue({\n  data: items,\n  labelKey: \"name\",\n  valueKey: \"id\",\n});\nconsole.log(optionsFromObjects);\n// [\n//   { name: 'apple', id: 1, label: 'apple', value: 1 },\n//   { name: 'banana', id: 2, label: 'banana', value: 2 }\n// ]\n```\n","readmeFilename":"README.md"}