{"_id":"@adiranids/strcaseconvert","_rev":"5-eaa24a595ec5f2de4a83a928b52dc3a5","name":"@adiranids/strcaseconvert","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@adiranids/strcaseconvert","version":"0.0.1","keywords":["string"],"author":{"name":"adiranids"},"license":"MIT","_id":"@adiranids/strcaseconvert@0.0.1","maintainers":[{"name":"adityask","email":"adityask2194@gmail.com"}],"dist":{"shasum":"06c377aa3ac6cab5d8ae707bf2bce233d2ef30ed","tarball":"https://registry.npmjs.org/@adiranids/strcaseconvert/-/strcaseconvert-0.0.1.tgz","fileCount":4,"integrity":"sha512-b0WNaIYY8OIVjImSxyW5oi7aCRBsRsWUc3qQg5kKwSjGZW77vVhlCzTqhgATSVte5phnzJbtrbfY5OBqRu5juw==","signatures":[{"sig":"MEQCIDSfWKXGXqpuT1rzZldcVdDcoAJCqbdwja6IsPYhGVIzAiBGjBzAdTOqJKNm3Q9PDn2t/iCaaJkQ+OFU+R/bZzHNQA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhr6ceCRA9TVsSAnZWagAAYeQP/Rg0UgwcuK8g3UOdM8XD\ngn5pl7DMNyOmBzvNqJ2qT/DSZ0rQOehTZdX4T0yZcdOIDKpJ5s/TP9lkO/gT\nzcWurVLqEVor71s9cZUyVEoaAr9osNaauu1R2YvL8/qQSEllC+1+HNargnml\nCoKy69lBNrTTnZV91GxlAUrYFDH7bHMSlvoyrL9SbJsZlH8gfyAaby57ofx4\nRgSOS6lYnwT3aqa7KQZzLZYZoFJ2BQkmC0pJ6XOcIfubqwAfti/gIfPf+2me\n9SQcl+8n9VlXDm5TaFIgeNY/X+CP6+ykFKfVkWTnruCo1PwxxS8dGUc3tgJ+\nGn/CyyfYhf4ii4KRtpUgmNErY0KPi/9ZtUJXZHXAZk6OnwqAQMCHdmW4wHX2\nQ4OlVhxxwAv6yol7O4S/EjP2kTvtaZl0LBZ+Ov7ugHiZQbCX8Ey5rhzmMUrj\nHY9Z2T4nC65SSJ3Hr+08NTA2WPVdUBc2tlViu1AyyytVS6JtgB8iVk1fObsO\nAUcgknr4efFEvQ8SZ0kJ0OkGLnF4EwT0YrurTsN6qO36B8K+lfrCTA9Vvc8W\nJJh7W1zeOI07x0ydroh1pIHnLvYY+Xa0UP5FQ693XX7lYfhAy0FJxtSbAzxP\nKW8m9koKYN3tDomFcK2HsmzD+xaKQviNDghH8wUF4AXvXQSuyU5en+AUEhXu\n6oLr\r\n=d+Jh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"5c2bf7e14f25708573d17092300c82599b8598de","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc"},"_npmUser":{"name":"adityask","email":"adityask2194@gmail.com"},"repository":{"url":"/adiranids/strconverter","type":"git"},"_npmVersion":"8.1.0","description":"light weight package to convert string from one form to another","directories":{},"_nodeVersion":"16.13.0","dependencies":{"typescript":"^4.5.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/strcaseconvert_0.0.1_1638901534393_0.5171746040483929","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2021-12-07T18:25:34.347Z","modified":"2025-07-08T23:02:25.283Z","0.0.1":"2021-12-07T18:25:34.548Z"},"author":{"name":"adiranids"},"license":"MIT","keywords":["string"],"repository":{"url":"/adiranids/strconverter","type":"git"},"description":"light weight package to convert string from one form to another","maintainers":[{"name":"adityask","email":"adityask2194@gmail.com"}],"readme":"# String case converter\r\nA light weight package to convert string from one case to another.\r\n\r\n# Installation\r\n\r\nUsing NPM\r\n\r\n`npm install @adiranids/strcaseconvert --save`\r\n\r\n\r\nUsing CDN\r\n\r\n`<script src=\"https://unpkg.com/@adiranids/strcaseconvert@0.0.1\"></script>`\r\n\r\n# Usage\r\n\r\nCurrently these cases are supported\r\n\r\n***camelCase, kebab-case, snake_case, sentence case***\r\n\r\n# 1. Camel case to sentence case and vice versa\r\n\r\n\r\nUsing NPM\r\n\r\n\r\n\r\n```\r\nimport {camelToSentence} from '@adiranids/strcaseconvert'\r\n\r\nconst result = camelToSentence(\"adityaKadam\")\r\nconsole.log(result)\r\n//Aditya Kadam\r\n\r\n```\r\n\r\n\r\nUsing CDN\r\n\r\n```\r\n<!-- insert the script tag in your HTML head section -->\r\n\r\nconst result = camelToSentence(\"adityaKadam\")\r\nconsole.log(result)\r\n//Aditya Kadam\r\n\r\n```\r\n\r\n\r\nThe function takes following parameters\r\ncamelToSentence(strToConvert, firstLetterCapital=true, reverseFlag=false)\r\n\r\nIf you want first letter in lowercase or the original case then just pass second parameter as false\r\n\r\n```\r\nconst result = camelToSentence(\"adityaKadam\", false)\r\nconsole.log(result)\r\n//aditya Kadam\r\n```\r\n\r\nTo convert from sentence case to camel case, pass third parameter as true.\r\n\r\n```\r\nconst result = camelToSentence(\"aditya kadam\", false, true)\r\nconsole.log(result)\r\n//adityaKadam\r\n\r\n```\r\n\r\n\r\n# 2. Convert from snake or kebab case to sentence case and vice versa\r\n\r\n\r\nUsing NPM\r\n\r\n\r\n\r\n```\r\nimport {convertToSentence} from '@adiranids/strcaseconvert'\r\n\r\nconst result = convertToSentence(\"snake\", \"aditya-kadam\")\r\nconsole.log(result)\r\n//Aditya kadam\r\n\r\n```\r\n\r\n\r\nUsing CDN\r\n\r\n```\r\n<!-- insert the script tag in your HTML head section -->\r\n\r\nconst result = convertToSentence(\"snake\", \"aditya-kadam\")\r\nconsole.log(result)\r\n//Aditya kadam\r\n\r\n```\r\n\r\n\r\nThe function has following parameters\r\n\r\n```\r\nconvertToSentence(from, originalText, firstLetterCapital = true, reverseFlag=false)\r\n\r\n```\r\n\r\nfrom -> possible values 'snake', 'kebab'\r\n\r\noriginalText -> depending on the value of from the text can be either snake or kebab case string. If you want to reverse convert then this originalText should be in sentence case.\r\n\r\nfirstLetterCapital -> determines whether the first letter should be capital or not. By default true , \r\n\r\nreverseFlag -> if set to true then converts sentence case to from case. By default false.\r\n\r\n\r\n# 3. Convert from one case to another\r\n\r\n\r\nUsing NPM\r\n\r\n\r\n\r\n```\r\nimport {convert} from '@adiranids/strcaseconvert'\r\n\r\nconst result = convert(\"kebab\", \"snake\", \"aditya-kadam\")\r\nconsole.log(result)\r\n//aditya_kadam\r\n\r\n```\r\n\r\n\r\nUsing CDN\r\n\r\n```\r\n<!-- insert the script tag in your HTML head section -->\r\n\r\nconst result = convert(\"kebab\", \"snake\", \"aditya-kadam\")\r\nconsole.log(result)\r\n//aditya_kadam\r\n\r\n```\r\n\r\nThe function has following parameters \r\n\r\n```\r\nconvert(from, to, originalText, firstLetterCapital)\r\n\r\n```\r\n\r\nfrom and to can have following possible values\r\n\r\n***'snake', 'kebab', 'camel'***\r\n\r\ndepending on from value originalText must be in respective case.\r\n\r\nfirstLetterCapital here is by default set to false. If the first letter needs to be upper case then just set this value to true.\r\n\r\n\r\n\r\n\r\n# License\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n\r\n\r\nMIT License\r\n\r\nCopyright (c) 2021 Adirani Digital Solutions Ltd\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.","readmeFilename":"README.md"}