{"_id":"@c_s_v_s_subrahmanyam/string-utils","_rev":"4-b17f6c1de126e86719b1e82739d767b4","name":"@c_s_v_s_subrahmanyam/string-utils","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@c_s_v_s_subrahmanyam/string-utils","version":"1.0.0","keywords":["string","utilities","validation","transformation","analytics"],"author":{"name":"Chinthalapati Sri Venkata Sai Subrahmanyam"},"license":"ISC","_id":"@c_s_v_s_subrahmanyam/string-utils@1.0.0","maintainers":[{"name":"c_s_v_s_subrahmanyam","email":"subrahmanyam310308@gmail.com"}],"dist":{"shasum":"625289d03ec73b496cbd869ceee50970653fa5e8","tarball":"https://registry.npmjs.org/@c_s_v_s_subrahmanyam/string-utils/-/string-utils-1.0.0.tgz","fileCount":6,"integrity":"sha512-hGaTM2lDGPwyqjEBs/r2+7aS0LY2ansVaQRVvBh512ESRE0QpxGGupCmw0JyO6LRNM59TYeg+2PKP960MWu/+Q==","signatures":[{"sig":"MEQCICjvf5RweqSNKCInWeoD3RndyjDl4FD/Yl6raUe3NEKiAiAaQVJHpdUlR+Jqo5QdAQ8MdX9S+ZURopnvy+aamCY66A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3475},"main":"src/index.js","type":"commonjs","scripts":{"test":"node test.js"},"_npmUser":{"name":"c_s_v_s_subrahmanyam","email":"subrahmanyam310308@gmail.com"},"_npmVersion":"11.0.0","description":"A comprehensive utility library for advanced string operations.","directories":{},"_nodeVersion":"22.13.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/string-utils_1.0.0_1737129978215_0.16393770325692603","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@c_s_v_s_subrahmanyam/string-utils","version":"1.0.1","keywords":["string","utilities","validation","transformation","analytics"],"author":{"name":"Chinthalapati Sri Venkata Sai Subrahmanyam"},"license":"ISC","_id":"@c_s_v_s_subrahmanyam/string-utils@1.0.1","maintainers":[{"name":"c_s_v_s_subrahmanyam","email":"subrahmanyam310308@gmail.com"}],"dist":{"shasum":"0c0008e944a7fd1c8cac6e66a88b3f08bb884d8d","tarball":"https://registry.npmjs.org/@c_s_v_s_subrahmanyam/string-utils/-/string-utils-1.0.1.tgz","fileCount":9,"integrity":"sha512-7OscadMAHeECKC0Dn0xwrXAzz6GT8rqiODzIMSzGIQ73UbeB+ZRAmQm87s/kHSzomxXl2xSNKTaJtODY87DZqg==","signatures":[{"sig":"MEUCIDW6RSziMgpxqLRxNmMy98uoCwEDLIWLk6ybr84eAix+AiEAjbnepzU8iqeiw1TuMjRCqE32gThUpVMjZKGdXQ5yLqg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6579},"main":"src/index.js","type":"commonjs","scripts":{"test":"node test.js"},"_npmUser":{"name":"c_s_v_s_subrahmanyam","email":"subrahmanyam310308@gmail.com"},"_npmVersion":"11.0.0","description":"A comprehensive utility library for advanced string operations.","directories":{},"_nodeVersion":"22.13.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/string-utils_1.0.1_1737130466909_0.17398086737825746","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@c_s_v_s_subrahmanyam/string-utils","version":"1.0.2","keywords":["string","utilities","validation","transformation","analytics"],"author":{"name":"Chinthalapati Sri Venkata Sai Subrahmanyam"},"license":"ISC","_id":"@c_s_v_s_subrahmanyam/string-utils@1.0.2","maintainers":[{"name":"c_s_v_s_subrahmanyam","email":"subrahmanyam310308@gmail.com"}],"dist":{"shasum":"c82dcbf92716ec87593cfbc66ebf2d912b84c95b","tarball":"https://registry.npmjs.org/@c_s_v_s_subrahmanyam/string-utils/-/string-utils-1.0.2.tgz","fileCount":16,"integrity":"sha512-z5Sz3BN6vmNv7i+Lbs2VrA99jkHljuw/PyC8/xtqSmm2kr/Z6dM0kP9qhq1dEipJQqtCK/VgvMvS+g6JUuaYpw==","signatures":[{"sig":"MEYCIQDPb16T+v73GY+rQ5TAxTKDgYIn05JenR0JyRfhkGyysgIhAIufemJP962af/Iu+aZYBkax0MhkF3FzR2Fiee4z+92A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18710},"main":"src/index.js","type":"commonjs","scripts":{"test":"node test.js"},"_npmUser":{"name":"c_s_v_s_subrahmanyam","email":"subrahmanyam310308@gmail.com"},"_npmVersion":"11.0.0","description":"A comprehensive utility library for advanced string operations.","directories":{},"_nodeVersion":"22.13.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/string-utils_1.0.2_1737133863816_0.802252815310855","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@c_s_v_s_subrahmanyam/string-utils","version":"1.0.3","keywords":["string","utilities","validation","transformation","analytics"],"author":{"name":"Chinthalapati Sri Venkata Sai Subrahmanyam"},"license":"ISC","_id":"@c_s_v_s_subrahmanyam/string-utils@1.0.3","maintainers":[{"name":"c_s_v_s_subrahmanyam","email":"subrahmanyam310308@gmail.com"}],"dist":{"shasum":"71e5cc841f82c8e738a71d4dcc50c1048eb1b332","tarball":"https://registry.npmjs.org/@c_s_v_s_subrahmanyam/string-utils/-/string-utils-1.0.3.tgz","fileCount":16,"integrity":"sha512-1XCyLBABozPcFVOC61/upvNRKBHLUiXrMgwO6J8iCcbWc8BXNicE7T4Q6dYH/bZBrPsgDSznouD2jzEsX45w2g==","signatures":[{"sig":"MEQCIEbxrsQviksKHLAG8lhtTwJGBSiLTk4dAa8TtPklcv5PAiAg1eyQA0BbAo4vVpirwY7wNQHmn4G+4EflI5gFm0aSWQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18690},"main":"src/index.js","type":"commonjs","scripts":{"test":"node test.js"},"_npmUser":{"name":"c_s_v_s_subrahmanyam","email":"subrahmanyam310308@gmail.com"},"_npmVersion":"11.0.0","description":"A comprehensive utility library for advanced string operations.","directories":{},"_nodeVersion":"22.13.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/string-utils_1.0.3_1737134200917_0.9635034163490777","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@c_s_v_s_subrahmanyam/string-utils","version":"1.0.4","main":"src/index.js","scripts":{"test":"node test.js"},"keywords":["string","utilities","validation","transformation","analytics","email check","captcha check","password check","password strength","password hashing","random string","random number","extract email","extract urls","string-utilities","c_s_v_s_subrahmanyam","sorting","searching","reversing","substring","encryption","decryption","encoding","decoding","compression","decompression","formatting","parsing","validation","captcha generation","count characters","is palindrome","remove prefix","remove suffix","password suggestions","password generation","password validation","unique string","indexing and slicing","string manipulation"],"author":{"name":"Chinthalapati Sri Venkata Sai Subrahmanyam"},"license":"ISC","type":"commonjs","description":"A comprehensive utility library for advanced string operations.","_id":"@c_s_v_s_subrahmanyam/string-utils@1.0.4","gitHead":"2128d47152da87ff2d96496324a64f70d8ea9143","_nodeVersion":"22.13.0","_npmVersion":"11.0.0","dist":{"integrity":"sha512-/WLNKLb4xYlzmYc6kroKges9d6mMyRIbBsWR6XLRkQaLVVcgYCWw3KsP22FbnlWdT/JYj8szt5kQC3jGnYzTgw==","shasum":"ef15a39b4728e8730f528297c78ebacd9bf3ca37","tarball":"https://registry.npmjs.org/@c_s_v_s_subrahmanyam/string-utils/-/string-utils-1.0.4.tgz","fileCount":17,"unpackedSize":23891,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC14Dj+nAKi+Pzi1xIwEQYxRCmXAutpyISnUbpp3v3whwIgWTrAs19IJ6vdgXU9yEAF/Na+rd0xq438XbpyaKV5dQI="}]},"_npmUser":{"name":"c_s_v_s_subrahmanyam","email":"subrahmanyam310308@gmail.com"},"directories":{},"maintainers":[{"name":"c_s_v_s_subrahmanyam","email":"subrahmanyam310308@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/string-utils_1.0.4_1737190803458_0.036758553518216"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-17T16:06:18.129Z","modified":"2025-01-18T09:00:03.858Z","1.0.0":"2025-01-17T16:06:18.382Z","1.0.1":"2025-01-17T16:14:27.237Z","1.0.2":"2025-01-17T17:11:04.049Z","1.0.3":"2025-01-17T17:16:41.087Z","1.0.4":"2025-01-18T09:00:03.651Z"},"author":{"name":"Chinthalapati Sri Venkata Sai Subrahmanyam"},"license":"ISC","keywords":["string","utilities","validation","transformation","analytics","email check","captcha check","password check","password strength","password hashing","random string","random number","extract email","extract urls","string-utilities","c_s_v_s_subrahmanyam","sorting","searching","reversing","substring","encryption","decryption","encoding","decoding","compression","decompression","formatting","parsing","validation","captcha generation","count characters","is palindrome","remove prefix","remove suffix","password suggestions","password generation","password validation","unique string","indexing and slicing","string manipulation"],"description":"A comprehensive utility library for advanced string operations.","maintainers":[{"name":"c_s_v_s_subrahmanyam","email":"subrahmanyam310308@gmail.com"}],"readme":"# @c_s_v_s_subrahmanyam/string-utils\r\n\r\nA comprehensive set of string manipulation utilities implemented in JavaScript. This package offers a variety of custom functions for string analysis, transformation, checks, and more.\r\n\r\nAll string operations are implemented manually without relying on inbuilt functions for educational purposes.\r\n\r\n## Installation\r\n\r\nYou can install the package via npm:\r\n\r\n```bash\r\nnpm install @c_s_v_s_subrahmanyam/string-utils\r\n```\r\n\r\n## Usage\r\nOnce installed, you can use the string utilities in your JavaScript code like so:\r\n```\r\nconst stringUtils = require('@c_s_v_s_subrahmanyam/string-utils');\r\n\r\n// Translate string using a mapping\r\nconst mapping = { 'a': '1', 'b': '2', 'c': '3' };\r\nconsole.log(stringUtils.translate('abc', mapping)); // 123\r\n\r\n// Expand tabs with a specified tab size\r\nconsole.log(stringUtils.expandTabs('Hello\\tWorld', 4)); // Hello    World\r\n\r\n// Iterate over characters of a string\r\nconsole.log(stringUtils.iterateCharacters('Hello')); // ['H', 'e', 'l', 'l', 'o']\r\n\r\n// Get length of string\r\nconsole.log(stringUtils.getLength('Hello World')); // 11\r\n\r\n// Count words in a string\r\nconsole.log(stringUtils.countWords('Hello World! This is a test.')); // 6\r\n\r\n// Reverse a string\r\nconsole.log(stringUtils.reverse('abcd')); // dcba\r\n\r\n// Convert string to uppercase\r\nconsole.log(stringUtils.toUpperCase('hello')); // HELLO\r\n```\r\nThe remaining functions' sample code is available in the test.js file\r\n\r\n## Available Functions\r\n\r\n### String Translation\r\n- ```translate(str, mapping)```: Translates characters in the string according to the provided mapping.\r\n### String Expansion and Iteration\r\n- ```expandTabs(str, tabSize)```: Expands tabs in the string with a specified tab size (default 4).\r\n- ```iterateCharacters(str)```: Returns an array of characters in the string.\r\n### Indexing and Slicing\r\n- ```sliceString(str, start, end)```: Slices the string from start to end indices.\r\n- ```getIndex(str, index):``` Returns the character at the specified index in the string.\r\n### String Partitioning\r\n- ```splitAt(str, index)```: Splits the string at the specified index into two parts.\r\n- ```partition(str, delimiter)```: Partitions the string at the first occurrence of the delimiter.\r\n- ```rpartition(str, delimiter)```: Partitions the string at the last occurrence of the delimiter.\r\n### Encoding and Decoding\r\n- ```encodeToBytes(str)```: Encodes the string into a byte array (UTF-8).\r\n- ```decodeFromBytes(bytes)```: Decodes a byte array into a string.\r\n- ```encodeBase64(str)```: Encodes the string to Base64.\r\n- ```decodeBase64(str)```: Decodes a Base64 string back to its original format.\r\n- ```encodeURI(str)```: Encodes the string as a URI.\r\n- ```decodeURI(str```: Decodes a URI-encoded string.\r\n### String Analytics\r\n- ```countCharacters(str)```: Returns the number of characters in the string.\r\n- ```characterFrequency(str)```: Returns the frequency of each character in the string.\r\n- ```startsWith(str, search)```: Checks if the string starts with the specified substring.\r\n- ```endsWith(str, search)```: Checks if the string ends with the specified substring.\r\n- ```substring(str, start, end)```: Returns a substring from start to end indices.\r\n- ```split(str, delimiter)```: Splits the string by the specified delimiter.\r\n- ```join(array, delimiter)```: Joins an array of strings into one string using the specified delimiter.\r\n### Case Folding and Normalization\r\n- ```caseFold(str)```: Converts the string to lowercase.\r\n- ```normalize(str, form)```: Normalizes the string to a specific Unicode form (default: 'NFC').\r\n### String Comparison Utilities\r\n- ```equalsIgnoreCase(str1, str2)```: Compares two strings ignoring case.\r\n- ```compareLexicographically(str1, str2)```: Compares two strings lexicographically.\r\n- ```startsWith(str, prefix)```: Checks if the string starts with the specified prefix.\r\n- ```endsWith(str, suffix)```: Checks if the string ends with the specified suffix.\r\n- ```containsSubstring(str, substring)```: Checks if the string contains the specified substring.\r\n### Prefix and Suffix Utilities\r\n- ```removePrefix(str, prefix)```: Removes the specified prefix from the string.\r\n- ```removeSuffix(str, suffix)```: Removes the specified suffix from the string.\r\n### Regex Utilities\r\n- ```match(str, regex)```: Returns an array of matches found using the regex.\r\n- ```replaceRegex(str, regex, replacement)```: Replaces matched substrings with the replacement string.\r\n- ```testRegex(str, regex)```: Tests if the string matches the given regex pattern.\r\n- ```extractEmails(str)```: Extracts all emails from the string.\r\n- ```extractURLs(str)```: Extracts all URLs from the string.\r\n### String Repetition\r\n- ```repeatString(str, times)```: Repeats the string the specified number of times.\r\n- ```generateCaptcha(length)```: Generates a random captcha string of the specified length (default 6).\r\n### Sorting Utilities\r\n- ```sortCharacters(str, order)```: Sorts the characters in the string in ascending or descending order.\r\n- ```sortWords(str, order)```: Sorts the words in the string in ascending or descending order.\r\n- ```uniqueCharacters(str)```: Returns a string with unique characters from the original string.\r\n### String Transformations\r\n- ```toUpperCase(str)```: Converts the string to uppercase.\r\n- ```toLowerCase(str)```: Converts the string to lowercase.\r\n- ```reverse(str)```: Reverses the string.\r\n- ```concatenate(...args)```: Concatenates multiple strings into one.\r\n- ```replace(str, search, replace)```: Replaces all occurrences of search in the string with replace.\r\n- ```trim(str)```: Trims leading and trailing whitespace from the string.\r\n- ```padStart(str, length, char)```: Pads the start of the string to the specified length with the given character.\r\n- ```padEnd(str, length, char)```: Pads the end of the string to the specified length with the given character.\r\n- ```caseConversion(str, targetCase)```: Converts the string to camelCase, snake_case, or kebab-case.\r\n### Unicode Operations\r\n- ```charAt(str, index)```: Returns the character at the specified index.\r\n- ```charCodeAt(str, index)```: Returns the Unicode value of the character at the specified index.\r\n- ```fromCharCode(...codes)```: Returns a string created from the given Unicode character codes.\r\n- ```toUnicode(str)```: Converts the string to Unicode escape sequences.\r\n- ```fromUnicode(unicodeStr)```: Converts a Unicode escape sequence string to a regular string.\r\n### Validators for Strings\r\n- ```isEmail(str)```: Checks if the string is a valid email address.\r\n- ```isURL(str)```: Checks if the string is a valid URL.\r\n- ```isPalindrome(str)```: Checks if the string is a palindrome (ignoring non-alphanumeric characters).\r\n- ```isAlphanumeric(str)```: Checks if the string contains only alphanumeric characters.\r\n- ```isDigit(str)```: Checks if the string is a valid number.\r\n- ```isSpace(str)```: Checks if the string contains only whitespace characters.\r\n- ```passwordStrength(password)```: Returns the strength of the password ('Weak', 'Medium', 'Strong').\r\n### Unique Words and Word Analysis\r\n- ```findUniqueWords(str)```: Extracts and returns an array of unique words from the input string.\r\n- ```getShortestWord(str)```: Returns the shortest word in the string.\r\n- ```getLongestWord(str)```: Returns the longest word in the string.\r\n### Sentence and Line Counting\r\n- ```countSentences(str)```: Counts the number of sentences in the string.\r\n- ```countLines(str)```: Counts the number of lines in the string.\r\n### Word Filtering\r\n- ```getWordsStartingWithConsonants(str)```: Returns an array of words starting with consonants.\r\n- ```getWordsStartingWithVowels(str)```: Returns an array of words starting with vowels.\r\n### String Comparison and Substrings\r\n- ```isAnagram(str1, str2)```: Checks if two strings are anagrams of each other.\r\n- ```isPangram(str)```: Checks if the string contains all letters of the alphabet.\r\n- ```reverseSubstring(str, substring)```: Reverses the specified substring in the string.\r\n- ```isSubstring(str, substring)```: Checks if the substring exists within the string.\r\n### Random String and Substring Generation\r\n- ```generateRandomSubstring(str, length)```: Generates a random substring of the specified length from the string.\r\n- ```generateRandomString(length)```: Generates a random string of the specified length using alphanumeric characters.\r\n### Password Suggestions\r\n- ```generatePasswordSuggestions(base)```: Generates an array of password suggestions based on the input base string.\r\n### License\r\nThis package is open-source and available under the **ISC License**.\r\n\r\n","readmeFilename":"README.md"}