{"_id":"@poppinss/string","_rev":"9-820fb8b3f9ddb8b3e986f4ddc8649389","name":"@poppinss/string","dist-tags":{"latest":"1.7.2"},"versions":{"1.1.0":{"name":"@poppinss/string","version":"1.1.0","keywords":["string","helpers","utils"],"author":{"name":"Harminder Virk","email":"virk@adonisjs.com"},"license":"MIT","_id":"@poppinss/string@1.1.0","maintainers":[{"name":"virk","email":"virk@adonisjs.com"},{"name":"romainlanz","email":"romain.lanz+npm@pm.me"},{"name":"julien-r44","email":"julien@ripouteau.com"}],"homepage":"https://github.com/poppinss/string#readme","bugs":{"url":"https://github.com/poppinss/string/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"dist":{"shasum":"e18222d1072070d30909dd009c0a227c2e6f307b","tarball":"https://registry.npmjs.org/@poppinss/string/-/string-1.1.0.tgz","fileCount":20,"integrity":"sha512-i6hroBjVzKLWuUAIAGI4bwvuqx3ZR073Ki+fo9dwXtSDRsc/tByYNRq9RtD17UG6Dziuw5rw/eiXc1wBrgPvnw==","signatures":[{"sig":"MEUCIGk2csiA+5kLL05xsjI7xu5/2dIOYpQPmAnD/sAuQzrmAiEAy6thjcqMW5fdVsaOEMPYmM1jeuwUbMQQxL2wPI+ukx8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@poppinss%2fstring@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":43190},"tsup":{"dts":false,"clean":true,"entry":["index.ts","string_builder.ts"],"format":"esm","outDir":"./build","target":"esnext","sourcemap":false},"type":"module","engines":{"node":">=20.6.0"},"exports":{".":"./build/index.js","./builder":"./build/string_builder.js"},"gitHead":"e2a0612f4683174edaa831a1cb10ea78ce7a3dfb","scripts":{"lint":"eslint .","test":"c8 npm run quick:test","build":"npm run compile","format":"prettier --write .","compile":"tsup-node && tsc --emitDeclarationOnly --declaration","pretest":"npm run lint","release":"release-it","version":"npm run build","typecheck":"tsc --noEmit","precompile":"npm run lint","quick:test":"node --import=ts-node-maintained/register/esm --enable-source-maps bin/test.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"virk","email":"virk@adonisjs.com"},"prettier":"@adonisjs/prettier-config","release-it":{"git":{"push":true,"tagName":"v${version}","commitMessage":"chore(release): ${version}","tagAnnotation":"v${version}","requireUpstream":true,"requireCleanWorkingDir":true},"npm":{"publish":true,"skipChecks":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/poppinss/string.git","type":"git"},"_npmVersion":"10.8.2","description":"A collection of helpers to perform operations on/related to a string value","directories":{},"_nodeVersion":"20.18.1","dependencies":{"bytes":"^3.1.2","slugify":"^1.6.6","pluralize":"^8.0.0","@lukeed/ms":"^2.0.2","truncatise":"^0.0.8","@types/bytes":"^3.1.5","case-anything":"^3.1.0","@types/pluralize":"^0.0.33"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.3","tsup":"^8.3.5","eslint":"^9.17.0","prettier":"^3.4.2","@swc/core":"^1.10.2","release-it":"^17.11.0","typescript":"^5.7.2","@types/node":"^22.10.2","@japa/assert":"^4.0.0","@japa/expect":"^3.0.2","@japa/runner":"^3.1.4","@japa/expect-type":"^2.0.2","@japa/file-system":"^2.3.1","@adonisjs/tsconfig":"^1.4.0","ts-node-maintained":"^10.9.4","@adonisjs/eslint-config":"^2.0.0-beta.6","@adonisjs/prettier-config":"^1.4.0","@release-it/conventional-changelog":"^9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/string_1.1.0_1735274044759_0.40466859862108406","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@poppinss/string","version":"1.2.0","keywords":["string","helpers","utils"],"author":{"name":"Harminder Virk","email":"virk@adonisjs.com"},"license":"MIT","_id":"@poppinss/string@1.2.0","maintainers":[{"name":"virk","email":"virk@adonisjs.com"},{"name":"romainlanz","email":"romain.lanz+npm@pm.me"},{"name":"julien-r44","email":"julien@ripouteau.com"}],"homepage":"https://github.com/poppinss/string#readme","bugs":{"url":"https://github.com/poppinss/string/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"dist":{"shasum":"f4c9142cdfe62948abf0ad25e15202119dc229d2","tarball":"https://registry.npmjs.org/@poppinss/string/-/string-1.2.0.tgz","fileCount":23,"integrity":"sha512-1z78zjqhfjqsvWr+pQzCpRNcZpIM+5vNY5SFOvz28GrL/LRanwtmOku5tBX7jE8/ng3oXaOVrB59lnnXFtvkug==","signatures":[{"sig":"MEUCIB5f9l0T+VRvPyD5+8kxxrmKjJ5xO9mkRIEtlyFv6Q3LAiEAwesxZNUWBcxANjc5cqFeF6+YZUyffmwiAk8lzUj7ELA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@poppinss%2fstring@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":52724},"tsup":{"dts":false,"clean":true,"entry":["index.ts","string_builder.ts"],"format":"esm","outDir":"./build","target":"esnext","sourcemap":false},"type":"module","engines":{"node":">=20.6.0"},"exports":{".":"./build/index.js","./builder":"./build/string_builder.js"},"gitHead":"65f23f10d79871395dbfc25dc032a531d11eb25f","scripts":{"lint":"eslint .","test":"c8 npm run quick:test","build":"npm run compile","format":"prettier --write .","compile":"tsup-node && tsc --emitDeclarationOnly --declaration","pretest":"npm run lint","release":"release-it","version":"npm run build","typecheck":"tsc --noEmit","precompile":"npm run lint","quick:test":"node --import=ts-node-maintained/register/esm --enable-source-maps bin/test.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"virk","email":"virk@adonisjs.com"},"prettier":"@adonisjs/prettier-config","release-it":{"git":{"push":true,"tagName":"v${version}","commitMessage":"chore(release): ${version}","tagAnnotation":"v${version}","requireUpstream":true,"requireCleanWorkingDir":true},"npm":{"publish":true,"skipChecks":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/poppinss/string.git","type":"git"},"_npmVersion":"10.8.2","description":"A collection of helpers to perform operations on/related to a string value","directories":{},"_nodeVersion":"20.18.1","dependencies":{"bytes":"^3.1.2","slugify":"^1.6.6","pluralize":"^8.0.0","@lukeed/ms":"^2.0.2","truncatise":"^0.0.8","@types/bytes":"^3.1.5","case-anything":"^3.1.0","@types/pluralize":"^0.0.33"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.3","tsup":"^8.3.5","eslint":"^9.17.0","prettier":"^3.4.2","@swc/core":"^1.10.4","release-it":"^17.11.0","typescript":"^5.7.2","@types/node":"^22.10.4","@japa/assert":"^4.0.0","@japa/expect":"^3.0.2","@japa/runner":"^3.1.4","string-width":"^7.2.0","@japa/snapshot":"^2.0.7","@poppinss/colors":"^4.1.4","@japa/expect-type":"^2.0.2","@japa/file-system":"^2.3.1","@adonisjs/tsconfig":"^1.4.0","ts-node-maintained":"^10.9.4","@adonisjs/eslint-config":"^2.0.0-beta.6","@adonisjs/prettier-config":"^1.4.0","@release-it/conventional-changelog":"^9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/string_1.2.0_1735888527214_0.891963258427801","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@poppinss/string","version":"1.3.0","keywords":["string","helpers","utils"],"author":{"name":"Harminder Virk","email":"virk@adonisjs.com"},"license":"MIT","_id":"@poppinss/string@1.3.0","maintainers":[{"name":"virk","email":"virk@adonisjs.com"},{"name":"romainlanz","email":"romain.lanz+npm@pm.me"},{"name":"julien-r44","email":"julien@ripouteau.com"}],"homepage":"https://github.com/poppinss/string#readme","bugs":{"url":"https://github.com/poppinss/string/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"dist":{"shasum":"61092ebd1419e398a4a29f5b0088369e82f0d9cb","tarball":"https://registry.npmjs.org/@poppinss/string/-/string-1.3.0.tgz","fileCount":23,"integrity":"sha512-8BMX3y6Dr3W8EtF8CbL0uRXxm7Ha48fHVPCfOp667Uh6J7C+d0DzcoBzzNnofnvwdzVMKy0DNZ4KmMioEBj2wQ==","signatures":[{"sig":"MEUCID1xoNbjH42Avb1jHzZ++kWQ+RmddFv1G81kA2Y8bWC6AiEA1clj1LqMcY6ICyynKXy8flb5DIDXnnQGgzP3JmSrPIM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@poppinss%2fstring@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":53203},"tsup":{"dts":false,"clean":true,"entry":["index.ts","string_builder.ts"],"format":"esm","outDir":"./build","target":"esnext","sourcemap":false},"type":"module","engines":{"node":">=20.6.0"},"exports":{".":"./build/index.js","./builder":"./build/string_builder.js"},"gitHead":"1155cca7a334bc45c293a5f5f3b9bfb23e4134cb","scripts":{"lint":"eslint .","test":"c8 npm run quick:test","build":"npm run compile","format":"prettier --write .","compile":"tsup-node && tsc --emitDeclarationOnly --declaration","pretest":"npm run lint","release":"release-it","version":"npm run build","typecheck":"tsc --noEmit","precompile":"npm run lint","quick:test":"node --import=ts-node-maintained/register/esm --enable-source-maps bin/test.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"virk","email":"virk@adonisjs.com"},"prettier":"@adonisjs/prettier-config","release-it":{"git":{"push":true,"tagName":"v${version}","commitMessage":"chore(release): ${version}","tagAnnotation":"v${version}","requireUpstream":true,"requireCleanWorkingDir":true},"npm":{"publish":true,"skipChecks":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/poppinss/string.git","type":"git"},"_npmVersion":"10.8.2","description":"A collection of helpers to perform operations on/related to a string value","directories":{},"_nodeVersion":"20.19.1","dependencies":{"bytes":"^3.1.2","slugify":"^1.6.6","pluralize":"^8.0.0","@lukeed/ms":"^2.0.2","truncatise":"^0.0.8","@types/bytes":"^3.1.5","case-anything":"^3.1.2","@types/pluralize":"^0.0.33"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.3","tsup":"^8.4.0","eslint":"^9.26.0","prettier":"^3.5.3","@swc/core":"1.10.7","release-it":"^19.0.2","typescript":"^5.8.3","@types/node":"^22.15.3","@japa/assert":"^4.0.1","@japa/expect":"^3.0.3","@japa/runner":"^4.2.0","string-width":"^7.2.0","@japa/snapshot":"^2.0.8","@poppinss/colors":"^4.1.4","@japa/expect-type":"^2.0.3","@japa/file-system":"^2.3.2","@adonisjs/tsconfig":"^1.4.0","ts-node-maintained":"^10.9.5","@adonisjs/eslint-config":"^2.0.0","@adonisjs/prettier-config":"^1.4.4","@release-it/conventional-changelog":"^10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/string_1.3.0_1746454995226_0.6636739385125148","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@poppinss/string","version":"1.4.0","keywords":["string","helpers","utils"],"author":{"name":"Harminder Virk","email":"virk@adonisjs.com"},"license":"MIT","_id":"@poppinss/string@1.4.0","maintainers":[{"name":"virk","email":"virk@adonisjs.com"},{"name":"romainlanz","email":"romain.lanz+npm@pm.me"},{"name":"julien-r44","email":"julien@ripouteau.com"}],"homepage":"https://github.com/poppinss/string#readme","bugs":{"url":"https://github.com/poppinss/string/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"dist":{"shasum":"829e59ee776e7efb27cbe27744d0eb317e05f216","tarball":"https://registry.npmjs.org/@poppinss/string/-/string-1.4.0.tgz","fileCount":26,"integrity":"sha512-Orhu92qXP3/J4ZY4m01cmbaAQ1AW6Lr1mn1JBbQA2xnMtEC5gC/7Itluyne6LnBAMJIaDTEik/k2PqQ/rtcSDA==","signatures":[{"sig":"MEUCID+s/knGsAc6sv+H6ETBfmAFyoPxHMR86LhGOv23pxhBAiEAxuYN6fWm5sAjLRRM5TSHOupO6ZOdTYVGKib4cUMwPv8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@poppinss%2fstring@1.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":57603},"tsup":{"dts":false,"clean":true,"entry":["index.ts","src/types.ts","string_builder.ts"],"format":"esm","outDir":"./build","target":"esnext","sourcemap":false},"type":"module","exports":{".":"./build/index.js","./types":"./build/src/types.js","./builder":"./build/string_builder.js"},"gitHead":"b3fbbe1e4427c12e7d040964324f89c25c77a676","scripts":{"lint":"eslint .","test":"c8 npm run quick:test","build":"npm run compile","format":"prettier --write .","compile":"tsup-node && tsc --emitDeclarationOnly --declaration","pretest":"npm run lint","release":"release-it","version":"npm run build","typecheck":"tsc --noEmit","precompile":"npm run lint","quick:test":"node --import=@poppinss/ts-exec --enable-source-maps bin/test.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"virk","email":"virk@adonisjs.com"},"prettier":"@adonisjs/prettier-config","release-it":{"git":{"push":true,"tagName":"v${version}","commitMessage":"chore(release): ${version}","tagAnnotation":"v${version}","requireUpstream":true,"requireCleanWorkingDir":true},"npm":{"publish":true,"skipChecks":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/poppinss/string.git","type":"git"},"_npmVersion":"11.3.0","description":"A collection of helpers to perform operations on/related to a string value","directories":{},"_nodeVersion":"24.0.2","dependencies":{"bytes":"^3.1.2","slugify":"^1.6.6","pluralize":"^8.0.0","@lukeed/ms":"^2.0.2","truncatise":"^0.0.8","@types/bytes":"^3.1.5","case-anything":"^3.1.2","@types/pluralize":"^0.0.33"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.3","tsup":"^8.4.0","eslint":"^9.26.0","prettier":"^3.5.3","release-it":"^19.0.2","typescript":"^5.8.3","@types/node":"^22.15.18","@japa/assert":"^4.0.1","@japa/expect":"^3.0.4","@japa/runner":"^4.2.0","string-width":"^7.2.0","@japa/snapshot":"^2.0.8","@poppinss/colors":"^4.1.4","@japa/expect-type":"^2.0.3","@japa/file-system":"^2.3.2","@poppinss/ts-exec":"^1.1.5","@adonisjs/tsconfig":"^1.4.0","@adonisjs/eslint-config":"^2.0.0","@adonisjs/prettier-config":"^1.4.4","@release-it/conventional-changelog":"^10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/string_1.4.0_1747910860930_0.08374793876840814","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@poppinss/string","version":"1.5.0","keywords":["string","helpers","utils"],"author":{"name":"Harminder Virk","email":"virk@adonisjs.com"},"license":"MIT","_id":"@poppinss/string@1.5.0","maintainers":[{"name":"virk","email":"virk@adonisjs.com"},{"name":"romainlanz","email":"romain.lanz+npm@pm.me"},{"name":"julien-r44","email":"julien@ripouteau.com"}],"homepage":"https://github.com/poppinss/string#readme","bugs":{"url":"https://github.com/poppinss/string/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"dist":{"shasum":"308aac5e9052bc9e5dcdd81d8bbc20615f0f83a9","tarball":"https://registry.npmjs.org/@poppinss/string/-/string-1.5.0.tgz","fileCount":26,"integrity":"sha512-Ilq9xAASmDPuK50rlUkLFpxZl7g/b4AwaGUbr3mYns+mZow6gToTvbbYk/PhVA3HU2Corug/aWWVGysOWnHcwQ==","signatures":[{"sig":"MEUCIQCtyrm5Be/4P/9O9tAuFUgbM3cOrgF1GLE3UeH+rfR0dgIgIiM+Ye/f+Hsg29PM0tGptpOl9QKGir9WnLifgKMLlR0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@poppinss%2fstring@1.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":58755},"tsup":{"dts":false,"clean":true,"entry":["index.ts","src/types.ts","string_builder.ts"],"format":"esm","outDir":"./build","target":"esnext","sourcemap":false},"type":"module","exports":{".":"./build/index.js","./types":"./build/src/types.js","./builder":"./build/string_builder.js"},"gitHead":"550b2a0b43016d354a3048035add5ed6dfad9bb4","scripts":{"lint":"eslint .","test":"c8 npm run quick:test","build":"npm run compile","format":"prettier --write .","compile":"tsup-node && tsc --emitDeclarationOnly --declaration","pretest":"npm run lint","release":"release-it","version":"npm run build","typecheck":"tsc --noEmit","precompile":"npm run lint","quick:test":"node --import=@poppinss/ts-exec --enable-source-maps bin/test.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"virk","email":"virk@adonisjs.com"},"prettier":"@adonisjs/prettier-config","release-it":{"git":{"push":true,"tagName":"v${version}","commitMessage":"chore(release): ${version}","tagAnnotation":"v${version}","requireUpstream":true,"requireCleanWorkingDir":true},"npm":{"publish":true,"skipChecks":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/poppinss/string.git","type":"git"},"_npmVersion":"11.3.0","description":"A collection of helpers to perform operations on/related to a string value","directories":{},"_nodeVersion":"24.0.2","dependencies":{"bytes":"^3.1.2","slugify":"^1.6.6","pluralize":"^8.0.0","@lukeed/ms":"^2.0.2","truncatise":"^0.0.8","@types/bytes":"^3.1.5","case-anything":"^3.1.2","@types/pluralize":"^0.0.33"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.3","tsup":"^8.4.0","eslint":"^9.26.0","prettier":"^3.5.3","release-it":"^19.0.2","typescript":"^5.8.3","@types/node":"^22.15.18","@japa/assert":"^4.0.1","@japa/expect":"^3.0.4","@japa/runner":"^4.2.0","string-width":"^7.2.0","@japa/snapshot":"^2.0.8","@poppinss/colors":"^4.1.4","@japa/expect-type":"^2.0.3","@japa/file-system":"^2.3.2","@poppinss/ts-exec":"^1.1.5","@adonisjs/tsconfig":"^1.4.0","@adonisjs/eslint-config":"^2.0.0","@adonisjs/prettier-config":"^1.4.4","@release-it/conventional-changelog":"^10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/string_1.5.0_1747913337707_0.25688860868429964","host":"s3://npm-registry-packages-npm-production"}},"1.6.0":{"name":"@poppinss/string","version":"1.6.0","keywords":["string","helpers","utils"],"author":{"name":"Harminder Virk","email":"virk@adonisjs.com"},"license":"MIT","_id":"@poppinss/string@1.6.0","maintainers":[{"name":"virk","email":"virk@adonisjs.com"},{"name":"romainlanz","email":"romain.lanz+npm@pm.me"},{"name":"julien-r44","email":"julien@ripouteau.com"}],"homepage":"https://github.com/poppinss/string#readme","bugs":{"url":"https://github.com/poppinss/string/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"dist":{"shasum":"3f88faf30a82f27a79d1cbaaaae1d0e24165d5e3","tarball":"https://registry.npmjs.org/@poppinss/string/-/string-1.6.0.tgz","fileCount":27,"integrity":"sha512-HfAf9VqTvo31BsruwgwEauQ316RNODdryk6QgYZo4qTV50s0h1H9HmIr+QjwwI3u4Sz7r4Q1dd1EVaLB7pWlaw==","signatures":[{"sig":"MEUCIFktQ8RFl8Y4AUhOXQrbwp7aNJ54Msjy01YpKPoL5iN+AiEAjoRKZtO9ev+lfx3Ogsdr6u4oHZ0XacCogwlYrmL6qWE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@poppinss%2fstring@1.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":60255},"tsup":{"dts":false,"clean":true,"entry":["index.ts","src/types.ts","string_builder.ts"],"format":"esm","outDir":"./build","target":"esnext","sourcemap":false},"type":"module","exports":{".":"./build/index.js","./types":"./build/src/types.js","./builder":"./build/string_builder.js"},"gitHead":"5e1b6a820424f35812620911ec4fb74a3c74b321","scripts":{"lint":"eslint .","test":"c8 npm run quick:test","build":"npm run compile","format":"prettier --write .","compile":"tsup-node && tsc --emitDeclarationOnly --declaration","pretest":"npm run lint","release":"release-it","version":"npm run build","typecheck":"tsc --noEmit","precompile":"npm run lint","quick:test":"node --import=@poppinss/ts-exec --enable-source-maps bin/test.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"virk","email":"virk@adonisjs.com"},"prettier":"@adonisjs/prettier-config","release-it":{"git":{"push":true,"tagName":"v${version}","commitMessage":"chore(release): ${version}","tagAnnotation":"v${version}","requireUpstream":true,"requireCleanWorkingDir":true},"npm":{"publish":true,"skipChecks":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/poppinss/string.git","type":"git"},"_npmVersion":"11.3.0","description":"A collection of helpers to perform operations on/related to a string value","directories":{},"_nodeVersion":"24.0.2","dependencies":{"bytes":"^3.1.2","slugify":"^1.6.6","pluralize":"^8.0.0","@lukeed/ms":"^2.0.2","truncatise":"^0.0.8","@types/bytes":"^3.1.5","case-anything":"^3.1.2","@types/pluralize":"^0.0.33"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.3","tsup":"^8.4.0","eslint":"^9.26.0","prettier":"^3.5.3","release-it":"^19.0.2","typescript":"^5.8.3","@types/node":"^22.15.18","@japa/assert":"^4.0.1","@japa/expect":"^3.0.4","@japa/runner":"^4.2.0","string-width":"^7.2.0","@japa/snapshot":"^2.0.8","@poppinss/colors":"^4.1.4","@japa/expect-type":"^2.0.3","@japa/file-system":"^2.3.2","@poppinss/ts-exec":"^1.1.5","@adonisjs/tsconfig":"^1.4.0","@adonisjs/eslint-config":"^2.0.0","@adonisjs/prettier-config":"^1.4.4","@release-it/conventional-changelog":"^10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/string_1.6.0_1747994196903_0.20062548995596186","host":"s3://npm-registry-packages-npm-production"}},"1.7.0":{"name":"@poppinss/string","version":"1.7.0","keywords":["string","helpers","utils"],"author":{"name":"Harminder Virk","email":"virk@adonisjs.com"},"license":"MIT","_id":"@poppinss/string@1.7.0","maintainers":[{"name":"virk","email":"virk@adonisjs.com"},{"name":"romainlanz","email":"romain.lanz+npm@pm.me"},{"name":"julien-r44","email":"julien@ripouteau.com"}],"homepage":"https://github.com/poppinss/string#readme","bugs":{"url":"https://github.com/poppinss/string/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"dist":{"shasum":"5d61fdf0e037186ecc5dbfdee60cd15d2acf252b","tarball":"https://registry.npmjs.org/@poppinss/string/-/string-1.7.0.tgz","fileCount":27,"integrity":"sha512-IuCtWaUwmJeAdby0n1a5cTYsBLe7fPymdc4oNTTl1b6l+Ok+14XpSX0ILOEU6UtZ9D2XI3f4TVUh4Titkk1xgw==","signatures":[{"sig":"MEYCIQDXpcY/8Uxpp0svKGIMnJbp1qvDT3L5MW/vf16nYPljxQIhAJUAnVmNYH3Ml2s9FrqRK8+x4bNxLlvU2m9jUeaCb0/c","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@poppinss%2fstring@1.7.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":60500},"tsup":{"dts":false,"clean":true,"entry":["index.ts","src/types.ts","string_builder.ts"],"format":"esm","outDir":"./build","target":"esnext","sourcemap":false},"type":"module","exports":{".":"./build/index.js","./types":"./build/src/types.js","./builder":"./build/string_builder.js"},"gitHead":"98572b41d6432b823e9eeb7e8b5aa84bba1d2eda","scripts":{"lint":"eslint .","test":"c8 npm run quick:test","build":"npm run compile","format":"prettier --write .","compile":"tsup-node && tsc --emitDeclarationOnly --declaration","pretest":"npm run lint","release":"release-it","version":"npm run build","typecheck":"tsc --noEmit","precompile":"npm run lint","quick:test":"node --import=@poppinss/ts-exec --enable-source-maps bin/test.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"virk","actor":{"name":"virk","type":"user","email":"virk@adonisjs.com"},"email":"virk@adonisjs.com"},"prettier":"@adonisjs/prettier-config","release-it":{"git":{"push":true,"tagName":"v${version}","commitMessage":"chore(release): ${version}","tagAnnotation":"v${version}","requireUpstream":true,"requireCleanWorkingDir":true},"npm":{"publish":true,"skipChecks":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/poppinss/string.git","type":"git"},"_npmVersion":"11.4.2","description":"A collection of helpers to perform operations on/related to a string value","directories":{},"_nodeVersion":"24.3.0","dependencies":{"bytes":"^3.1.2","slugify":"^1.6.6","pluralize":"^8.0.0","@lukeed/ms":"^2.0.2","truncatise":"^0.0.8","@types/bytes":"^3.1.5","case-anything":"^3.1.2","@types/pluralize":"^0.0.33"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.3","tsup":"^8.5.0","eslint":"^9.30.1","prettier":"^3.6.2","release-it":"^19.0.3","typescript":"^5.8.3","@types/node":"^24.0.10","@japa/assert":"^4.0.1","@japa/expect":"^3.0.4","@japa/runner":"^4.2.0","string-width":"^7.2.0","@japa/snapshot":"^2.0.8","@poppinss/colors":"^4.1.5","@japa/expect-type":"^2.0.3","@japa/file-system":"^2.3.2","@poppinss/ts-exec":"^1.4.0","@adonisjs/tsconfig":"^2.0.0-next.0","@adonisjs/eslint-config":"^3.0.0-next.0","@adonisjs/prettier-config":"^1.4.5","@release-it/conventional-changelog":"^10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/string_1.7.0_1751698264914_0.30773362887172073","host":"s3://npm-registry-packages-npm-production"}},"1.7.1":{"name":"@poppinss/string","version":"1.7.1","keywords":["string","helpers","utils"],"author":{"name":"Harminder Virk","email":"virk@adonisjs.com"},"license":"MIT","_id":"@poppinss/string@1.7.1","maintainers":[{"name":"virk","email":"virk@adonisjs.com"},{"name":"romainlanz","email":"romain.lanz+npm@pm.me"},{"name":"julien-r44","email":"julien@ripouteau.com"}],"homepage":"https://github.com/poppinss/string#readme","bugs":{"url":"https://github.com/poppinss/string/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"dist":{"shasum":"9014e89e82fdf548f60aad184ee3b10cd599d739","tarball":"https://registry.npmjs.org/@poppinss/string/-/string-1.7.1.tgz","fileCount":27,"integrity":"sha512-OrLzv/nGDU6l6dLXIQHe8nbNSWWfuSbpB/TW5nRpZFf49CLuQlIHlSPN9IdSUv2vG+59yGM6LoibsaHn8B8mDw==","signatures":[{"sig":"MEUCIQC5Szyu0c/5v0Aj6lvJIptZlrAxQzKkxejWwsBesrss4QIgIs0UoJrW64BBDRSU8lWPto6kcvqSvfriRI1JEjz318g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@poppinss%2fstring@1.7.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":65431},"type":"module","tsdown":{"dts":false,"clean":true,"entry":["index.ts","src/types.ts","string_builder.ts"],"format":"esm","minify":"dce-only","outDir":"./build","target":"esnext","treeshake":false,"sourcemaps":false,"fixedExtension":false},"exports":{".":"./build/index.js","./types":"./build/src/types.js","./builder":"./build/string_builder.js"},"gitHead":"7683fe715612a2bd1260c96990a1da247ab5880c","scripts":{"lint":"eslint .","test":"c8 npm run quick:test","build":"npm run compile","format":"prettier --write .","compile":"tsdown && tsc --emitDeclarationOnly --declaration","pretest":"npm run lint","release":"release-it","version":"npm run build","typecheck":"tsc --noEmit","precompile":"npm run lint","quick:test":"node --import=@poppinss/ts-exec --enable-source-maps bin/test.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:45c23187-08a8-4f79-bfab-395dfe7fdcd5"}},"prettier":"@adonisjs/prettier-config","release-it":{"git":{"push":true,"tagName":"v${version}","commitMessage":"chore(release): ${version}","tagAnnotation":"v${version}","requireUpstream":true,"requireCleanWorkingDir":true},"npm":{"publish":true,"skipChecks":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/poppinss/string.git","type":"git"},"_npmVersion":"11.6.2","description":"A collection of helpers to perform operations on/related to a string value","directories":{},"_nodeVersion":"24.11.1","dependencies":{"slugify":"^1.6.6","pluralize":"^8.0.0","case-anything":"^3.1.2","@types/pluralize":"^0.0.33"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.3","bytes":"^3.1.2","eslint":"^9.39.1","tsdown":"^0.17.3","prettier":"^3.7.4","@lukeed/ms":"^2.0.2","release-it":"^19.1.0","truncatise":"^0.0.8","typescript":"^5.9.3","@types/node":"^25.0.1","@japa/assert":"^4.1.1","@japa/expect":"^3.0.6","@japa/runner":"^4.4.0","@types/bytes":"^3.1.5","string-width":"^8.1.0","@japa/snapshot":"^2.0.9","@poppinss/colors":"^4.1.6","@japa/expect-type":"^2.0.3","@japa/file-system":"^2.3.2","@poppinss/ts-exec":"^1.4.1","@adonisjs/tsconfig":"^2.0.0-next.3","@adonisjs/eslint-config":"^3.0.0-next.5","@adonisjs/prettier-config":"^1.4.5","@release-it/conventional-changelog":"^10.0.3"},"_npmOperationalInternal":{"tmp":"tmp/string_1.7.1_1765534787593_0.9193858607267782","host":"s3://npm-registry-packages-npm-production"}},"1.7.2":{"name":"@poppinss/string","description":"A collection of helpers to perform operations on/related to a string value","version":"1.7.2","type":"module","exports":{".":"./build/index.js","./types":"./build/src/types.js","./builder":"./build/string_builder.js"},"scripts":{"pretest":"npm run lint","test":"c8 npm run quick:test","lint":"eslint .","format":"prettier --write .","typecheck":"tsc --noEmit","precompile":"npm run lint","compile":"tsdown && tsc --emitDeclarationOnly --declaration","build":"npm run compile","version":"npm run build","prepublishOnly":"npm run build","release":"release-it","quick:test":"node --import=@poppinss/ts-exec --enable-source-maps bin/test.ts"},"devDependencies":{"@adonisjs/eslint-config":"^3.0.0","@adonisjs/prettier-config":"^1.4.5","@adonisjs/tsconfig":"^2.0.0","@japa/assert":"^4.2.0","@japa/expect":"^3.0.7","@japa/expect-type":"^2.0.4","@japa/file-system":"^3.0.0","@japa/runner":"^5.3.0","@japa/snapshot":"^2.0.10","@lukeed/ms":"^2.0.2","@poppinss/colors":"^4.1.6","@poppinss/ts-exec":"^1.4.4","@release-it/conventional-changelog":"^10.0.6","@types/bytes":"^3.1.5","@types/node":"^25.6.0","bytes":"^3.1.2","c8":"^11.0.0","eslint":"^10.2.1","prettier":"^3.8.3","release-it":"^19.2.4","string-width":"^8.2.0","truncatise":"^0.0.8","tsdown":"^0.21.9","typescript":"^6.0.3"},"dependencies":{"@types/pluralize":"^0.0.33","case-anything":"^3.1.2","pluralize":"^8.0.0","slugify":"^1.6.9"},"homepage":"https://github.com/poppinss/string#readme","repository":{"type":"git","url":"git+https://github.com/poppinss/string.git"},"bugs":{"url":"https://github.com/poppinss/string/issues"},"keywords":["string","helpers","utils"],"author":{"name":"Harminder Virk","email":"virk@adonisjs.com"},"license":"MIT","publishConfig":{"access":"public","provenance":true},"tsdown":{"entry":["index.ts","src/types.ts","string_builder.ts"],"outDir":"./build","clean":true,"format":"esm","minify":"dce-only","fixedExtension":false,"dts":false,"treeshake":false,"sourcemaps":false,"target":"esnext"},"release-it":{"git":{"requireCleanWorkingDir":true,"requireUpstream":true,"commitMessage":"chore(release): ${version}","tagAnnotation":"v${version}","push":true,"tagName":"v${version}"},"github":{"release":true},"npm":{"publish":true,"skipChecks":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"c8":{"reporter":["text","html"],"exclude":["tests/**"]},"prettier":"@adonisjs/prettier-config","gitHead":"c14806f93afcf32d46ce47c08a2e07636842fefe","_id":"@poppinss/string@1.7.2","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-A182GLDfi36iDCbhDrHB0xzrPM1fO3GHnhCDIdadf8C6eycgct4m7zusbLwEh6GPaj2Pz5BVos7XK16w7tZ7wQ==","shasum":"70d4d83965a19a315b49653dfe8fb8b02ff7ffb9","tarball":"https://registry.npmjs.org/@poppinss/string/-/string-1.7.2.tgz","fileCount":27,"unpackedSize":72951,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@poppinss%2fstring@1.7.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD3fy8vts4HIOwVXpm+cbYg8NIKNi3brjvDqQt1vAYnnwIgE88v/1CYGJX/FdgLS+Uj6Z9CpYXhetM5/N7/CdrRJKc="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:45c23187-08a8-4f79-bfab-395dfe7fdcd5"}},"directories":{},"maintainers":[{"name":"virk","email":"virk@adonisjs.com"},{"name":"romainlanz","email":"romain.lanz+npm@pm.me"},{"name":"julien-r44","email":"julien@ripouteau.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/string_1.7.2_1776764407192_0.9828206535161235"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-27T04:34:04.596Z","modified":"2026-04-21T09:40:07.624Z","1.1.0":"2024-12-27T04:34:04.946Z","1.2.0":"2025-01-03T07:15:27.410Z","1.3.0":"2025-05-05T14:23:15.406Z","1.4.0":"2025-05-22T10:47:41.120Z","1.5.0":"2025-05-22T11:28:57.908Z","1.6.0":"2025-05-23T09:56:37.109Z","1.7.0":"2025-07-05T06:51:05.109Z","1.7.1":"2025-12-12T10:19:47.744Z","1.7.2":"2026-04-21T09:40:07.319Z"},"bugs":{"url":"https://github.com/poppinss/string/issues"},"author":{"name":"Harminder Virk","email":"virk@adonisjs.com"},"license":"MIT","homepage":"https://github.com/poppinss/string#readme","keywords":["string","helpers","utils"],"repository":{"type":"git","url":"git+https://github.com/poppinss/string.git"},"description":"A collection of helpers to perform operations on/related to a string value","maintainers":[{"name":"virk","email":"virk@adonisjs.com"},{"name":"romainlanz","email":"romain.lanz+npm@pm.me"},{"name":"julien-r44","email":"julien@ripouteau.com"}],"readme":"# @poppinss/string\n\n> A collection of helpers to perform operations on/related to a string value.\n\n[![gh-workflow-image]][gh-workflow-url] [![npm-image]][npm-url] ![][typescript-image] [![license-image]][license-url]\n\n## Installation\n\nInstall the package from the npm package registry.\n\n```sh\n# Npm\nnpm i @poppinss/string\n\n# Yarn\nyarn add @poppinss/string\n\n# Pnpm\npnpm add @poppinss/string\n```\n\n## Usage\n\nImport the package as follows to access the helpers.\n\n```ts\nimport string from '@poppinss/string'\n```\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**\n\n  - [excerpt](#excerpt)\n    - [OPTIONS](#options)\n  - [truncate](#truncate)\n    - [OPTIONS](#options-1)\n  - [slug](#slug)\n  - [interpolate](#interpolate)\n  - [toUnixSlash](#tounixslash)\n  - [plural](#plural)\n  - [singular](#singular)\n  - [pluralize](#pluralize)\n  - [isPlural](#isplural)\n  - [isSingular](#issingular)\n  - [camelCase](#camelcase)\n    - [EXAMPLES](#examples)\n  - [capitalCase](#capitalcase)\n    - [EXAMPLES](#examples-1)\n  - [dashCase](#dashcase)\n    - [EXAMPLES](#examples-2)\n  - [dotCase](#dotcase)\n    - [EXAMPLES](#examples-3)\n  - [noCase](#nocase)\n    - [EXAMPLES](#examples-4)\n  - [pascalCase](#pascalcase)\n    - [EXAMPLES](#examples-5)\n  - [sentenceCase](#sentencecase)\n    - [EXAMPLES](#examples-6)\n  - [snakeCase](#snakecase)\n    - [EXAMPLES](#examples-7)\n  - [titleCase](#titlecase)\n    - [EXAMPLES](#examples-8)\n  - [wordWrap](#wordwrap)\n    - [OPTIONS](#options-2)\n  - [htmlEscape](#htmlescape)\n    - [EXAMPLES](#examples-9)\n  - [justify](#justify)\n  - [random](#random)\n  - [uuid](#uuid)\n  - [toSentence](#tosentence)\n  - [condenseWhitespace](#condensewhitespace)\n  - [ordinal](#ordinal)\n  - [seconds.parse](#secondsparse)\n  - [seconds.format](#secondsformat)\n  - [milliseconds.parse](#millisecondsparse)\n  - [milliseconds.format](#millisecondsformat)\n  - [bytes.parse](#bytesparse)\n  - [bytes.format](#bytesformat)\n    - [OPTIONS](#options-3)\n  - [String builder](#string-builder)\n- [Contributing](#contributing)\n- [Code of Conduct](#code-of-conduct)\n- [License](#license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n### excerpt\n\nGenerate an excerpt from content up to a certain length. If the input contains HTML tags, they will be stripped from the output.\n\n```ts\nimport string from '@poppinss/string'\n\nconst html = `<p>AdonisJS is a Node.js framework, and hence it requires Node.js to be installed on your computer. To be precise, we need at least the latest release of <code>Node.js v14</code>.</p>`\n\nconsole.log(string.excerpt(html, 70))\n// AdonisJS is a Node.js framework, and hence it requires Node.js to be i...\n```\n\n#### OPTIONS\n\nThe following is the list of options you may provide as the 3rd parameter.\n\n```ts\nstring.excerpt(html, 70, {\n  completeWords: true,\n  suffix: '<a href=\"\">Read more</a>',\n})\n```\n\n<dl>\n  <dt>completeWords</dt>\n  <dd>\n\nWhen set to `true`, the truncation will occur only after complete words. This option might exceed the defined character limit.\n\n  </dd>\n\n  <dt>suffix</dt>\n  <dd>\n\nValue to append after the truncated string. Defaults to three dots `...`.\n\n  </dd>\n</dl>\n\n### truncate\n\nTruncate a string value to a certain length. The method is the same as the `excerpt` method, but it does not remove any HTML tags.\n\n```ts\nimport string from '@poppinss/string'\n\nconst text = `AdonisJS is a Node.js framework, and hence it requires Node.js to be installed on your computer. To be precise, we need at least the latest release of Node.js 14.`\n\nconsole.log(string.truncate(text, 70))\n// AdonisJS is a Node.js framework, and hence it requires Node.js to be i...\n```\n\n#### OPTIONS\n\nFollowing is the list of options you may provide as the 3rd parameter.\n\n```ts\nstring.truncate(text, 70, {\n  completeWords: true,\n  suffix: '<a href=\"\">Read more</a>',\n})\n```\n\n<dl>\n  <dt>completeWords</dt>\n  <dd>\n\nWhen set to `true`, the truncation will occur only after complete words. This option might exceed the defined character limit.\n\n  </dd>\n\n  <dt>suffix</dt>\n  <dd>\n\nValue to append after the truncated string. Defaults to three dots `...`.\n\n  </dd>\n</dl>\n\n### slug\n\nGenerate a slug for a value.\n\nThe method is exported directly from the [slugify](https://www.npmjs.com/package/slugify) package. Therefore, please check the package documentation for [available options](https://www.npmjs.com/package/slugify#options).\n\n```ts\nimport string from '@poppinss/string'\n\nconsole.log(string.slug('hello ♥ world'))\n// hello-love-world\n```\n\nYou can define custom replacements for Unicode values as follows.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.slug.extend({ '☢': 'radioactive' })\nconsole.log(string.slug('unicode ♥ is ☢'))\n// unicode-love-is-radioactive\n```\n\n### interpolate\n\nInterpolate variables specified inside double curly braces (`{{}}`).\n\n```ts\nimport string from '@poppinss/string'\n\nstring.interpolate('hello {{ user.username }}', {\n  user: { username: 'virk' },\n})\n\n// hello virk\n```\n\nYou may replace array values using the array index.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.interpolate('hello {{ users.0 }}', { users: ['virk'] })\n\n// hello virk\n```\n\nCurly braces can be escaped from interpolation using two backslashes ('\\\\').\n\n```ts\nimport string from '@poppinss/string'\n\nstring.interpolate('hello \\\\{{ users.0 }}', {})\n\n// hello {{ users.0 }}\n```\n\n### toUnixSlash\n\nConvert OS-specific file paths to Unix file paths. Credits [https://github.com/sindresorhus/slash](https://github.com/sindresorhus/slash)\n\n```ts\nimport string from '@poppinss/string'\n\nconst value = path.join('foo', 'bar')\n// Unix    => foo/bar\n// Windows => foo\\\\bar\n\nstring.toUnixSlash(value) // foo/bar\n```\n\n### plural\n\nConvert a word to its plural form. The method is exported directly from the [pluralize](https://www.npmjs.com/package/pluralize) package.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.plural('test')\n// tests\n```\n\n### singular\n\nConvert a word to its singular form. The method is exported directly from the [pluralize](https://www.npmjs.com/package/pluralize) package.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.singular('tests')\n// test\n```\n\n### pluralize\n\nConvert value to its `plural` or `singular` form based on the count.\n\n```ts\nimport string from '@poppinss/string'\n\nlet errorsCount = 10\nconst message = `There ${string.pluralize('is', errorsCount)} ${errorsCount} ${string.pluralize('error', errorsCount)}`\n// There are 10 errors\n\nerrorsCount = 1\n// There is 1 error\n```\n\n```ts\n// title: More examples\nstring.pluralize('box', 1) // box\nstring.pluralize('box', 2) // boxes\nstring.pluralize('box', 0) // boxes\n\nstring.pluralize('boxes', 1) // box\nstring.pluralize('boxes', 2) // boxes\nstring.pluralize('boxes', 0) // boxes\n```\n\nThe `addPluralRule`, `addSingularRule`, `addIrregularRule`, and `addUncountableRule` methods exposed by the pluralize package can be used as follows.\n\n```ts\nstring.pluralize.addUncountableRule('paper')\nstring.pluralize.addSingularRule(/singles$/i, 'singular')\n```\n\n### isPlural\n\nFind if a word is already in plural form. The method is exported directly from the [pluralize](https://www.npmjs.com/package/pluralize) package.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.isPlural('tests') // true\n```\n\n### isSingular\n\nFind if a word is already in a singular form. The method is exported directly from the [pluralize](https://www.npmjs.com/package/pluralize) package.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.isSingular('test') // true\n```\n\n### camelCase\n\nConvert value to camel case.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.camelCase('user_name') // userName\n```\n\n#### EXAMPLES\n\n| Input            | Output        |\n| ---------------- | ------------- |\n| 'test'           | 'test'        |\n| 'test string'    | 'testString'  |\n| 'Test String'    | 'testString'  |\n| 'TestV2'         | 'testV2'      |\n| '_foo_bar_'      | 'fooBar'      |\n| 'version 1.2.10' | 'version1210' |\n| 'version 1.21.0' | 'version1210' |\n\n### capitalCase\n\nConvert value to capital case.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.capitalCase('helloWorld') // Hello World\n```\n\n#### EXAMPLES\n\n| Input            | Output           |\n| ---------------- | ---------------- |\n| 'test'           | 'Test'           |\n| 'test string'    | 'Test String'    |\n| 'Test String'    | 'Test String'    |\n| 'TestV2'         | 'Test V 2'       |\n| 'version 1.2.10' | 'Version 1.2.10' |\n| 'version 1.21.0' | 'Version 1.21.0' |\n\n### dashCase\n\nConvert value to dash case.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.dashCase('helloWorld') // hello-world\n```\n\nOptionally, you can capitalize the first letter of each word.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.dashCase('helloWorld', { capitalize: true }) // Hello-World\n```\n\n#### EXAMPLES\n\n| Input            | Output         |\n| ---------------- | -------------- |\n| 'test'           | 'test'         |\n| 'test string'    | 'test-string'  |\n| 'Test String'    | 'test-string'  |\n| 'Test V2'        | 'test-v2'      |\n| 'TestV2'         | 'test-v-2'     |\n| 'version 1.2.10' | 'version-1210' |\n| 'version 1.21.0' | 'version-1210' |\n\n### dotCase\n\nConvert value to dot case.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.dotCase('helloWorld') // hello.World\n```\n\nOptionally, you can also convert the first letter of all the words to lowercase.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.dotCase('helloWorld', { lowerCase: true }) // hello.world\n```\n\n#### EXAMPLES\n\n| Input            | Output         |\n| ---------------- | -------------- |\n| 'test'           | 'test'         |\n| 'test string'    | 'test.string'  |\n| 'Test String'    | 'Test.String'  |\n| 'dot.case'       | 'dot.case'     |\n| 'path/case'      | 'path.case'    |\n| 'TestV2'         | 'Test.V.2'     |\n| 'version 1.2.10' | 'version.1210' |\n| 'version 1.21.0' | 'version.1210' |\n\n### noCase\n\nRemove all sorts of casing from a string value.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.noCase('helloWorld') // hello world\n```\n\n#### EXAMPLES\n\n| Input                  | Output                 |\n| ---------------------- | ---------------------- |\n| 'test'                 | 'test'                 |\n| 'TEST'                 | 'test'                 |\n| 'testString'           | 'test string'          |\n| 'testString123'        | 'test string123'       |\n| 'testString_1_2_3'     | 'test string 1 2 3'    |\n| 'ID123String'          | 'id123 string'         |\n| 'foo bar123'           | 'foo bar123'           |\n| 'a1bStar'              | 'a1b star'             |\n| 'CONSTANT_CASE '       | 'constant case'        |\n| 'CONST123_FOO'         | 'const123 foo'         |\n| 'FOO_bar'              | 'foo bar'              |\n| 'XMLHttpRequest'       | 'xml http request'     |\n| 'IQueryAArgs'          | 'i query a args'       |\n| 'dot.case'             | 'dot case'             |\n| 'path/case'            | 'path case'            |\n| 'snake_case'           | 'snake case'           |\n| 'snake_case123'        | 'snake case123'        |\n| 'snake_case_123'       | 'snake case 123'       |\n| '\"quotes\"'             | 'quotes'               |\n| 'version 0.45.0'       | 'version 0 45 0'       |\n| 'version 0..78..9'     | 'version 0 78 9'       |\n| 'version 4_99/4'       | 'version 4 99 4'       |\n| ' test '               | 'test'                 |\n| 'something_2014_other' | 'something 2014 other' |\n| 'amazon s3 data'       | 'amazon s3 data'       |\n| 'foo_13_bar'           | 'foo 13 bar'           |\n\n### pascalCase\n\nConvert value to pascal case.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.pascalCase('user team') // UserTeam\n```\n\n#### EXAMPLES\n\n| Input            | Output        |\n| ---------------- | ------------- |\n| 'test'           | 'Test'        |\n| 'test string'    | 'TestString'  |\n| 'Test String'    | 'TestString'  |\n| 'TestV2'         | 'TestV2'      |\n| 'version 1.2.10' | 'Version1210' |\n| 'version 1.21.0' | 'Version1210' |\n\n### sentenceCase\n\nConvert value to a sentence.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.sentenceCase('getting-started-with-adonisjs')\n// Getting started with adonisjs\n```\n\n#### EXAMPLES\n\n| Input            | Output           |\n| ---------------- | ---------------- |\n| 'test'           | 'Test'           |\n| 'test string'    | 'Test string'    |\n| 'Test String'    | 'Test string'    |\n| 'TestV2'         | 'Test v2'        |\n| 'version 1.2.10' | 'Version 1 2 10' |\n| 'version 1.21.0' | 'Version 1 21 0' |\n\n### snakeCase\n\nConvert value to snake case.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.snakeCase('user team') // user_team\n```\n\n#### EXAMPLES\n\n| Input            | Output         |\n| ---------------- | -------------- |\n| '\\_id'           | 'id'           |\n| 'test'           | 'test'         |\n| 'test string'    | 'test_string'  |\n| 'Test String'    | 'test_string'  |\n| 'Test V2'        | 'test_v2'      |\n| 'TestV2'         | 'test_v_2'     |\n| 'version 1.2.10' | 'version_1210' |\n| 'version 1.21.0' | 'version_1210' |\n\n### titleCase\n\nConvert value to title case.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.titleCase('small word ends on')\n// Small Word Ends On\n```\n\n#### EXAMPLES\n\n| Input                              | Output                             |\n| ---------------------------------- | ---------------------------------- |\n| 'one. two.'                        | 'One. Two.'                        |\n| 'a small word starts'              | 'A Small Word Starts'              |\n| 'small word ends on'               | 'Small Word Ends On'               |\n| 'we keep NASA capitalized'         | 'We Keep NASA Capitalized'         |\n| 'pass camelCase through'           | 'Pass camelCase Through'           |\n| 'follow step-by-step instructions' | 'Follow Step-by-Step Instructions' |\n| 'this vs. that'                    | 'This vs. That'                    |\n| 'this vs that'                     | 'This vs That'                     |\n| 'newcastle upon tyne'              | 'Newcastle upon Tyne'              |\n| 'newcastle \\*upon\\* tyne'          | 'Newcastle \\*upon\\* Tyne'          |\n\n### wordWrap\n\nWrap words in a sentence after a specific character count. The sentence is always split after a word finishes. Therefore, some lines may exceed or stay smaller than the provided length.\n\n```ts\nimport string from '@poppinss/string'\n\nconst sentence = `Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.\n\nIt has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.\n\nIt was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.`\n\nconst output = string.wordWrap(sentence, { width: 40 })\n\n/**\nLorem Ipsum is simply dummy text of the\nprinting and typesetting industry. Lorem\nIpsum has been the industry's standard\ndummy text ever since the 1500s, when an\nunknown printer took a galley of type\nand scrambled it to make a type specimen\nbook.\n\nIt has survived not only five centuries,\nbut also the leap into electronic\ntypesetting, remaining essentially\nunchanged.\n\nIt was popularised in the 1960s with the\nrelease of Letraset sheets containing\nLorem Ipsum passages, and more recently\nwith desktop publishing software like\nAldus PageMaker including versions of\nLorem Ipsum.\n*/\n```\n\nYou may also indent preceding lines with a given character. In the following example, we indent lines with 2 spaces.\n\n```ts\nconst output = string.wordWrap(sentence, {\n  width: 40,\n  indent: '  ',\n})\n\n/**\nLorem Ipsum is simply dummy text of the\n  printing and typesetting industry. Lorem\n  Ipsum has been the industry's standard\n  dummy text ever since the 1500s, when an\n  unknown printer took a galley of type\n  and scrambled it to make a type specimen\n  book.\n\n  It has survived not only five centuries,\n  but also the leap into electronic\n  typesetting, remaining essentially\n  unchanged.\n\n  It was popularised in the 1960s with the\n  release of Letraset sheets containing\n  Lorem Ipsum passages, and more recently\n  with desktop publishing software like\n  Aldus PageMaker including versions of\n  Lorem Ipsum.\n*/\n```\n\n#### OPTIONS\n\nThe following options can be specified as the 2nd parameter.\n\n<dl>\n  <dt>indent</dt>\n  <dd>\n\nCharacter(s) to use for indenting text after the first line\n\n  </dd>\n\n  <dt>width</dt>\n  <dd>\n\nNumber of characters after which to split the line\n\n  </dd>\n\n  <dt>newLine</dt>\n  <dd>\n\nSpecify the new line character to use for splitting lines. `default=\\n`\n\n  </dd>\n\n  <dt>escape</dt>\n  <dd>\n\nSpecify a function to escape the contents. The method will be once for each line.\n\n  </dd>\n</dl>\n\n### htmlEscape\n\nEscape special characters in a string value, such that it can be used in HTML content. The `\"`, `'`, `&`, `<`, and `>` characters are escaped.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.htmlEscape('&foo <> bar \"fizz\" l\\'a')\n// Output: &amp;foo &lt;&gt; bar &quot;fizz&quot; l&#39;a\n```\n\n#### EXAMPLES\n\n| Input                                | Output                               |\n| ------------------------------------ | ------------------------------------ |\n| `htmlEscape('&<>\"\\'')`               | `'&amp;&lt;&gt;&quot;&#39;'`         |\n| `htmlEscape('🦄 & 🐐')`              | `'🦄 &amp; 🐐'`                      |\n| `htmlEscape('Hello <em>World</em>')` | `'Hello &lt;em&gt;World&lt;/em&gt;'` |\n| `htmlEscape('no escape')`            | `'no escape'`                        |\n| `htmlEscape('foo&bar')`              | `'foo&amp;bar'`                      |\n| `htmlEscape('<tag>')`                | `'&lt;tag&gt;'`                      |\n| `htmlEscape(\"test=\\'foo\\'\")`         | `'test=&#39;foo&#39;'`               |\n| `htmlEscape('test=\"foo\"')`           | `'test=&quot;foo&quot;'`             |\n| `htmlEscape('<ta\\'&g\">')`            | `'&lt;ta&#39;&amp;g&quot;&gt;'`      |\n| `htmlEscape('foo<<bar')`             | `'foo&lt;&lt;bar'`                   |\n\n### justify\n\nJustify the text of multiple columns as per the defined max-width. Columns smaller than the provided max width will be padded with empty spaces or the provided `indent` char.\n\n```ts\nimport string from '@poppinss/string'\n\nconst output = string.justify(['help', 'serve', 'make:controller'], {\n  width: 20,\n})\n\n/**\n[\n  'help                ',\n  'serve               ',\n  'make:controller     ',\n]\n*/\n```\n\nBy default, the columns are left-aligned. However, they can also be right-aligned using the `align` option.\n\n```ts\nconst output = string.justify(['help', 'serve', 'make:controller'], {\n  width: 20,\n  align: 'right',\n})\n\n/**\n[\n  '                help',\n  '               serve',\n  '     make:controller',\n]\n*/\n```\n\nIf the columns contain ANSI escape sequences, you must specify a custom `getLength` method to compute the column length without counting the ANSI escape sequences.\n\n```ts\nimport stringWidth from 'string-width'\n\nconst output = string.justify(['help', 'serve', 'make:controller'], {\n  width: 20,\n  align: 'right',\n  /**\n   * The `string-width` package returns the length of the string\n   * without accounting for ANSI escape sequences\n   */\n  getLength: (chunk) => stringWidth(chunk),\n})\n```\n\n### random\n\nGenerate a cryptographically secure random string of a given length. The output value is a URL-safe base64-encoded string.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.random(32)\n// 8mejfWWbXbry8Rh7u8MW3o-6dxd80Thk\n```\n\nYou can replace the random generator using the `random.use` method and restore the original implementation using the `random.restore` method.\n\n```ts\n// Custom generator\nstring.random.use((size) => {\n  return 'a'.repeat(size)\n})\n\nstring.random(10) // aaaaaaaaaa\n\n// Restore original implementation\nstring.random.restore()\n```\n\n### uuid\n\nGenerate a UUID v4 value. The `uuid` method uses the [crypto.randomUUID](https://nodejs.org/api/crypto.html#cryptorandomuuidoptions) under the hood. However, it does allow you to replace the original implementation with a custom method.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.uuid()\n// 1a7989bf-a176-42fb-97ef-1368f2466027\n```\n\n```ts\n// Custom generator\nstring.uuid.use(() => {\n  return 'xxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'\n})\n\nstring.uuid() // 'xxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'\n\n// Restore original implementation\nstring.uuid.restore()\n```\n\n### toSentence\n\nConvert an array of words to a comma-separated sentence.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.toSentence(['routes', 'controllers', 'middleware'])\n// routes, controllers, and middleware\n```\n\nYou can replace the `and` with an `or` by specifying the `options.lastSeparator` property.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.toSentence(['routes', 'controllers', 'middleware'], {\n  lastSeparator: ', or ',\n})\n```\n\nIn the following example, the two words are combined using the `and` separator, not the comma. However, you can use a custom separator for a pair of words.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.toSentence(['routes', 'controllers'])\n// routes and controllers\n\nstring.toSentence(['routes', 'controllers'], {\n  pairSeparator: ', and ',\n})\n// routes, and controllers\n```\n\n### condenseWhitespace\n\nReplace multiple whitespaces in a string with a single whitespace.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.condenseWhitespace('hello  world')\n// hello world\n\nstring.condenseWhitespace('  hello  world  ')\n// hello world\n```\n\n### ordinal\n\nGet the ordinal letter for a given number.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.ordinal(1) // 1st\nstring.ordinal(2) // '2nd'\nstring.ordinal(3) // '3rd'\nstring.ordinal(4) // '4th'\n\nstring.ordinal(23) // '23rd'\nstring.ordinal(24) // '24th'\n```\n\n### seconds.parse\n\nParse a human-readable time expression to seconds. If the unit value is a number, it will be returned as it is. Otherwise, the string expression will be converted to a number representing seconds. An `Error` is thrown when the input cannot be parsed.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.seconds.parse('10h') // 36000\nstring.seconds.parse('1 day') // 86400\n\nstring.seconds.parse(180) // 180\n```\n\nYou can enforce strict time expression using the `PrettyTime` type.\n\n```ts\nimport string from '@poppinss/string'\nimport { PrettyTime } from '@poppinss/string/types'\n\nfunction toSeconds(value: PrettyTime) {\n  return string.seconds.parse(value)!\n}\n\ntoSeconds('1 hour') // works\ntoSeconds('1hr') // works\ntoSeconds('1 heure') // type error\n```\n\n### seconds.format\n\nFormats seconds to a human-readable string value.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.seconds.format(36000) // 10h\nstring.seconds.format(36000, true) // 10 hours\n```\n\n### milliseconds.parse\n\nParse a human-readable time expression to milliseconds. If the unit value is a number, it will be returned as it is. Otherwise, the string expression will be converted to a number representing milliseconds. An `Error` is thrown when the input cannot be parsed.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.milliseconds.parse('1 h') // 3.6e6\nstring.milliseconds.parse('1 day') // 8.64e7\n\nstring.milliseconds.parse(180) // 180\n```\n\n### milliseconds.format\n\nFormats milliseconds to a human-readable string value.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.milliseconds.format(3.6e6) // 1h\nstring.milliseconds.format(3.6e6, true) // 1 hour\n```\n\n### bytes.parse\n\nParse a human-readable string expression to bytes. If the unit value is a number, it will be returned as it is. Otherwise, the string expression will be converted to a number representing bytes. A `null` value is returned when the input cannot be parsed.\n\nSupported units and abbreviations are as follows and are case-insensitive:\n\n- `b` for bytes\n- `kb` for kilobytes\n- `mb` for megabytes\n- `gb` for gigabytes\n- `tb` for terabytes\n- `pb` for petabytes\n\n```ts\nimport string from '@poppinss/string'\n\nstring.bytes.parse('1KB') // 1024\nstring.bytes.parse('1MB') // 1048576\n```\n\nYou can enforce strict bytes expression using the `PrettyBytes` type.\n\n```ts\nimport string from '@poppinss/string'\nimport { PrettyBytes } from '@poppinss/string/types'\n\nfunction toBytes(value: PrettyBytes) {\n  return string.bytes.parse(value)!\n}\n\ntoBytes('1 KB') // works\ntoBytes('1 kilobytes') // type error\n```\n\n### bytes.format\n\nFormats bytes to a human-readable string value. When input cannot be formatted, the `null` value is returned.\n\n```ts\nimport string from '@poppinss/string'\n\nstring.bytes.format(1048576) // 1MB\nstring.bytes.format(1024 _ 1024 _ 1000) // 1000MB\nstring.bytes.format(1024 _ 1024 _ 1000, { thousandsSeparator: ',' }) // 1,000MB\n\nstring.bytes.format(1048576, { unitSeparator: ' ' }) // 1 MB\nstring.bytes.format(1048576, { unit: 'KB' }) // 1024KB\n```\n\n#### OPTIONS\n\n<dl>\n  <dt>decimalPlaces</dt>\n  <dd>\n\nA maximum number of decimal places to include in the output. `default=2`.\n\n  </dd>\n\n  <dt>fixedDecimals</dt>\n  <dd>\n\nWhether to always display the maximum number of decimal places. `default=false`.\n\n  </dd>\n\n  <dt>thousandsSeparator</dt>\n  <dd>\n  \n  Specify the separator for thousands. `default=''`.\n  \n  </dd>\n\n  <dt>unit</dt>\n  <dd>\n  \n  The unit in which the result will be returned. It could be `B/KB/MB/GB/TB`. The default behavior is to auto-detect based on the input.\n\n  </dd>\n\n  <dt>unitSeparator</dt>\n  <dd>\n\nThe separator between the value and the `unit`. `default=''`.\n\n  </dd>\n</dl>\n\n### String builder\n\nThe string builder offers a fluent API for applying a set of transforms on a string value. You can create an instance of the string builder as follows.\n\n```ts\nimport StringBuilder from '@poppinss/string/builder'\nconst builder = new StringBuilder('userController')\n\nconst value = builder\n  .removeSuffix('controller') // user\n  .plural() // users\n  .snakeCase() // users\n  .suffix('_controller') // users_controller\n  .ext('ts') // users_controller.ts\n  .toString()\n\nassert(value === 'users_controller.ts')\n```\n\n## Contributing\n\nOne of the primary goals of Poppinss is to have a vibrant community of users and contributors who believe in the principles of the framework.\n\nBefore contributing to the framework, we encourage you to read the [contribution guide](https://github.com/poppinss/.github/blob/main/docs/CONTRIBUTING.md).\n\n## Code of Conduct\n\nTo ensure that the Poppinss community is welcoming to all, please review and abide by the [Code of Conduct](https://github.com/poppinss/.github/blob/main/docs/CODE_OF_CONDUCT.md).\n\n## License\n\nPoppinss string is open-sourced software licensed under the [MIT license](LICENSE.md).\n\n[gh-workflow-image]: https://img.shields.io/github/actions/workflow/status/poppinss/string/checks.yml?style=for-the-badge\n[gh-workflow-url]: https://github.com/poppinss/string/actions/workflows/checks.yml 'Github action'\n[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript\n[typescript-url]: \"typescript\"\n[npm-image]: https://img.shields.io/npm/v/@poppinss/string.svg?style=for-the-badge&logo=npm\n[npm-url]: https://npmjs.org/package/@poppinss/string 'npm'\n[license-image]: https://img.shields.io/npm/l/@poppinss/string?color=blueviolet&style=for-the-badge\n[license-url]: LICENSE.md 'license'\n","readmeFilename":"README.md"}