{"name":"decamelize","version":"6.0.1","description":"Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/decamelize.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","types":"./index.d.ts","sideEffects":false,"engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"ava && tsd","//test":"xo && ava && tsd"},"keywords":["decamelize","decamelcase","camelcase","lowercase","case","dash","hyphen","string","text","convert"],"devDependencies":{"ava":"^5.0.1","tsd":"^0.24.1","xo":"^0.52.4"},"_id":"decamelize@6.0.1","gitHead":"494888567380ecb41f64e8ce00fee44cb87b93d0","bugs":{"url":"https://github.com/sindresorhus/decamelize/issues"},"homepage":"https://github.com/sindresorhus/decamelize#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-G7Cqgaelq68XHJNGlZ7lrNQyhZGsFqpwtGFexqUv4IQdjKoSYF7ipZ9UuTJZUSQXFj/XaoBLuEVIVqr8EJngEQ==","shasum":"e858c37870153e1f733e92347ac3a3f009081ca7","tarball":"http://registry-npm.ywwl.com/decamelize/download/decamelize-6.0.1.tgz","fileCount":5,"unpackedSize":6968,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCeGc5Ow6FbB5xYbcXurYua5SvO3KXbbTBzSQ92HMExyAIhAPdOP/yHAm9L9sONMYYvxQVrQHiBHQju5AY2S3g50Jsy"}],"size":2759,"noattachment":false,"key":"/decamelize/-/decamelize-6.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/decamelize_6.0.1_1755615034747_0.0376992603570836"},"_hasShrinkwrap":false,"readme":"# decamelize\n\n> Convert a camelized string into a lowercased one with a custom separator\\\n> Example: `unicornRainbow` → `unicorn_rainbow`\n\nIf you use this on untrusted user input, don't forget to limit the length to something reasonable.\n\n## Install\n\n```sh\nnpm install decamelize\n```\n\n*If you need Safari support, [stay on](https://github.com/sindresorhus/decamelize/issues/24) [version 3](https://github.com/sindresorhus/decamelize/issues/36) [until they implement](https://caniuse.com/js-regexp-lookbehind) regex lookbehinds.*\n\n## Usage\n\n```js\nimport decamelize from 'decamelize';\n\ndecamelize('unicornRainbow');\n//=> 'unicorn_rainbow'\n\ndecamelize('unicornRainbow', {separator: '-'});\n//=> 'unicorn-rainbow'\n\ndecamelize('testGUILabel', {preserveConsecutiveUppercase: true});\n//=> 'test_GUI_label'\n\ndecamelize('testGUILabel', {preserveConsecutiveUppercase: false});\n//=> 'test_gui_label'\n```\n\n## API\n\n### decamelize(input, options?)\n\n#### input\n\nType: `string`\n\n#### options\n\nType: `object`\n\n##### separator\n\nType: `string`\\\nDefault: `'_'`\n\nThe character or string used to separate words.\n\n```js\nimport decamelize from 'decamelize';\n\ndecamelize('unicornRainbow');\n//=> 'unicorn_rainbow'\n\ndecamelize('unicornRainbow', {separator: '-'});\n//=> 'unicorn-rainbow'\n```\n\n##### preserveConsecutiveUppercase\n\nType: `boolean`\\\nDefault: `false`\n\nPreserve sequences of uppercase characters.\n\n```js\nimport decamelize from 'decamelize';\n\ndecamelize('testGUILabel');\n//=> 'test_gui_label'\n\ndecamelize('testGUILabel', {preserveConsecutiveUppercase: true});\n//=> 'test_GUI_label'\n```\n\n## Related\n\n- [camelcase](https://github.com/sindresorhus/camelcase) - The inverse of this package\n- [decamelize-keys](https://github.com/sindresorhus/decamelize-keys) - Convert object keys from camel case\n","publish_time":1755615035009,"_cnpm_publish_time":1755615035009,"dist-tags":{"latest":"7.0.0"}}