{"_id":"@amandeepsingh13/modify-str","_rev":"4-324ca74d4293ecb7055e474bd1851695","name":"@amandeepsingh13/modify-str","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@amandeepsingh13/modify-str","version":"1.0.0","keywords":["string","utility","typescript","npm","formatter"],"author":{"name":"Amandeep Singh"},"license":"MIT","_id":"@amandeepsingh13/modify-str@1.0.0","maintainers":[{"name":"amandeepsingh13","email":"amanpank8910@gmail.com"}],"dist":{"shasum":"170e7d36f0852592b28c3f2f34bb704295717242","tarball":"https://registry.npmjs.org/@amandeepsingh13/modify-str/-/modify-str-1.0.0.tgz","fileCount":6,"integrity":"sha512-80cUHqJC6ReOJ47+PaMdZzLbUbb9RTklx0IplWtfVPdJ4AnQOO6ADFFDc1GlZdWnnupzr+mevop/Y2aIc+JvDQ==","signatures":[{"sig":"MEUCIQCndvkFsbbFqsRuu3T77LWWZ1tVlrG0H8Hz38PfkuJ0jAIgdBeiivgBQhJVsPxJqVKgqPbgAwxNzNRMB6sHSX1RAWA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6031},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"8a040561f7a32f8fcb2a80edef05f128760d9f52","scripts":{"test":"vitest run","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"amandeepsingh13","email":"amanpank8910@gmail.com"},"_npmVersion":"10.8.2","description":"A configurable, immutable string modification utility written in TypeScript","directories":{},"_nodeVersion":"20.19.6","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/modify-str_1.0.0_1768298514153_0.4978447523263103","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@amandeepsingh13/modify-str","version":"1.0.2","keywords":["string","utility","typescript","npm","formatter"],"author":{"name":"Amandeep Singh"},"license":"MIT","_id":"@amandeepsingh13/modify-str@1.0.2","maintainers":[{"name":"amandeepsingh13","email":"amanpank8910@gmail.com"}],"dist":{"shasum":"cdd5a3761d7eaf46fa80139727629e5c74197079","tarball":"https://registry.npmjs.org/@amandeepsingh13/modify-str/-/modify-str-1.0.2.tgz","fileCount":6,"integrity":"sha512-bkROtcl3ztscNirEHOjWcPUutzW0/5xAE4SHXjndESeWC2E+7CgqFHuEXjLkY0EWzUUyUp6klqGY4YGd5o2j7w==","signatures":[{"sig":"MEYCIQDaWKNQngj29nhvnD/Vgk3Ov64xQ4Vt3WYzh573KP8/mwIhAJo8CNyPKy0JfeJwK9KtEQEG1WnddGxObm45wTD40bBv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7738},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"23e8d3e1357339312704025c082c827d88d10baf","scripts":{"test":"npx vitest run","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"amandeepsingh13","email":"amanpank8910@gmail.com"},"_npmVersion":"10.8.2","description":"A configurable, immutable string modification utility written in TypeScript","directories":{},"_nodeVersion":"20.19.6","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/modify-str_1.0.2_1768460272502_0.42675236002137873","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@amandeepsingh13/modify-str","version":"1.0.3","keywords":["string","utility","typescript","npm","formatter"],"author":{"name":"Amandeep Singh"},"license":"MIT","_id":"@amandeepsingh13/modify-str@1.0.3","maintainers":[{"name":"amandeepsingh13","email":"amanpank8910@gmail.com"}],"dist":{"shasum":"f9a88f17f95b58c76a5434a7c97d724656283493","tarball":"https://registry.npmjs.org/@amandeepsingh13/modify-str/-/modify-str-1.0.3.tgz","fileCount":6,"integrity":"sha512-ASrMzfXnrI59I1Hb2jxW+xHnu8GJjvc53Nx2bRia7BC3vfwqHgFajIfe0ynXO4GwCE2aqHi42qOGyIbAs4kp0A==","signatures":[{"sig":"MEUCIQDEBk6thDX/h+3AyMgFzL/aHXITrZAgQnrQmXXA0r/OtwIgAU4HH4U0foGNpllyYOGCfnZXGFeIuh2Im2W9Zjx2aEU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8045},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"163819511e891f41e89844c3ee4bd3ae3094d169","scripts":{"test":"npx vitest run","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"amandeepsingh13","email":"amanpank8910@gmail.com"},"_npmVersion":"10.8.2","description":"A configurable, immutable string modification utility written in TypeScript","directories":{},"_nodeVersion":"20.19.6","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/modify-str_1.0.3_1768460891820_0.46984293938329746","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@amandeepsingh13/modify-str","version":"1.0.4","description":"A configurable, immutable string modification utility written in TypeScript","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","scripts":{"build":"tsup","test":"npx vitest run","prepublishOnly":"npm run build"},"keywords":["string","utility","typescript","npm","formatter"],"author":{"name":"Amandeep Singh"},"license":"MIT","_id":"@amandeepsingh13/modify-str@1.0.4","gitHead":"6a9dd22d77dc2e992d40939eb0a2325721f00c7b","_nodeVersion":"20.19.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-wbBMcJBHXzZSAP+cdqjZfTOMefhzIrcboUXjwgtjzAKGcBP1YPyoTzHeYgGuANoXMLVrafOulRMl2vriblSxKg==","shasum":"329d10ddbc63fd014e53e09fa098d839392e24d7","tarball":"https://registry.npmjs.org/@amandeepsingh13/modify-str/-/modify-str-1.0.4.tgz","fileCount":6,"unpackedSize":8039,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD7odGJfhgfhvDnXMPF7wp1mqpAjV5v/GpyzAU696yYegIhAPbN8kl5OHX8YCL+mowU73pmL0GPPQjPKIRCPMvh/GgB"}]},"_npmUser":{"name":"amandeepsingh13","email":"amanpank8910@gmail.com"},"directories":{},"maintainers":[{"name":"amandeepsingh13","email":"amanpank8910@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/modify-str_1.0.4_1768461051173_0.4801261158266279"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-13T10:01:54.044Z","modified":"2026-01-15T07:10:51.451Z","1.0.0":"2026-01-13T10:01:54.311Z","1.0.2":"2026-01-15T06:57:52.652Z","1.0.3":"2026-01-15T07:08:11.964Z","1.0.4":"2026-01-15T07:10:51.331Z"},"author":{"name":"Amandeep Singh"},"license":"MIT","keywords":["string","utility","typescript","npm","formatter"],"description":"A configurable, immutable string modification utility written in TypeScript","maintainers":[{"name":"amandeepsingh13","email":"amanpank8910@gmail.com"}],"readme":"![CI](https://github.com/Amandeep-tech/modify-str/actions/workflows/ci.yml/badge.svg)\n\n# modify-str\n\n`modify-str` is a small, lightweight utility that allows you to **modify strings using a single, configurable function**.\n\nIt is designed to be:\n- **Immutable & pure** (no side effects)\n- **Predictable** (clear rules when multiple options are used)\n- **Type-safe** (written in TypeScript, ships JavaScript + type definitions)\n\n---\n\n## ✨ Why modify-str?\n\nInstead of manually chaining multiple string operations:\n\n```js\nstr.trim().toUpperCase().replace(/\\s+/g, \"_\");\n```\n\nYou can declaratively describe what you want:\n\n```js\nmodifyStr(\"Hello World\", {\n  trim: true,\n  snakeCase: true,\n  toUpperCase: true,\n});\n```\n\nThis makes string transformations:\n\n1. Easier to read\n\n2. Easier to maintain\n\n3. Easier to extend\n\n## Installation\n`npm install @amandeepsingh13/modify-str`\n\n## Basic Usage\n\n```js\n// ESM\nimport { modifyStr } from \"@amandeepsingh13/modify-str\";\n\nconst result = modifyStr(\"Hello World\", {\n  snakeCase: true,\n});\n\nconsole.log(result);\n// hello_world\n```\n\n```js\n// CommonJS\nconst { modifyStr } = require(\"@amandeepsingh13/modify-str\");\n\nconsole.log(\n  modifyStr(\"Hello World\", { toUpperCase: true })\n);\n// HELLO WORLD\n```\n\n\n## ⚙️ Available Options\n\n### `trim`\n\n| Property | Value |\n|--------|------|\n| **Type** | `boolean` |\n| **Description** | Removes leading and trailing spaces |\n| **Example** | `\"  hi  \"` → `\"hi\"` |\n\n---\n\n### `removeExtraSpaces`\n\n| Property | Value |\n|--------|------|\n| **Type** | `boolean` |\n| **Description** | Collapses multiple spaces into a single space |\n| **Example** | `\"hi   there\"` → `\"hi there\"` |\n\n---\n\n### `capitaliseFirstChar`\n\n| Property | Value |\n|--------|------|\n| **Type** | `boolean` |\n| **Description** | Capitalizes the first character of the string |\n| **Example** | `\"hello\"` → `\"Hello\"` |\n\n---\n\n### `snakeCase`\n\n| Property | Value |\n|--------|------|\n| **Type** | `boolean` |\n| **Description** | Converts a string to `snake_case` |\n| **Example** | `\"Hello World\"` → `\"hello_world\"` |\n\n---\n\n### `camelCase`\n\n| Property | Value |\n|--------|------|\n| **Type** | `boolean` |\n| **Description** | Converts a string to `camelCase` |\n| **Example** | `\"hello world\"` → `\"helloWorld\"` |\n\n\n\n## Applying Multiple Transformations\n\n```js\nmodifyStr(\"  Hello World  \", {\n  trim: true,\n  snakeCase: true,\n  toUpperCase: true,\n});\n// HELLO_WORLD\n```\n\n\n\n## Conflict Resolution (Important)\n\nIf conflicting options are provided,\nthe last option wins.\n\n```js\nmodifyStr(\"Hello World\", {\n  toUpperCase: true,\n  toLowerCase: true,\n});\n\n// hello world\n\n```\n\n\n","readmeFilename":"README.md"}