{"_id":"@cabdi_waaxid/combinations","name":"@cabdi_waaxid/combinations","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@cabdi_waaxid/combinations","version":"1.0.0","description":"Generate all possible combinations and permutations from a string with filters.","main":"index.js","keywords":["combinations","permutations","string","generator"],"author":{"name":"Cabdi Waaxid Siciid"},"license":"MIT","_id":"@cabdi_waaxid/combinations@1.0.0","_nodeVersion":"25.3.0","_npmVersion":"11.10.1","dist":{"integrity":"sha512-pBqasd72cyUBZKuLhvD5JIQsZVbx1VbfQnTO+a3DjVz1drXGNrZfP4C/Zfv1tPRV/bn9tzDIJOrFJRAkhfE29g==","shasum":"94deefd6c8f67733d5dad65d9f15b41db0c30d68","tarball":"https://registry.npmjs.org/@cabdi_waaxid/combinations/-/combinations-1.0.0.tgz","fileCount":3,"unpackedSize":4806,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBjwZzhjd8g6taJbmPetxFclW0HpQQ7LKmCyXJ1LnLcKAiBC5MdN49wLJtuFpPQIOnQDhpyfFrPWbYZvcOR5exaMVw=="}]},"_npmUser":{"name":"cabdi_waaxid","email":"cabdiwaaxidsiciid100@gmail.com"},"directories":{},"maintainers":[{"name":"cabdi_waaxid","email":"cabdiwaaxidsiciid100@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/combinations_1.0.0_1772895690447_0.6955558160841864"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-07T15:01:30.368Z","1.0.0":"2026-03-07T15:01:30.600Z","modified":"2026-03-07T15:01:30.793Z"},"maintainers":[{"name":"cabdi_waaxid","email":"cabdiwaaxidsiciid100@gmail.com"}],"description":"Generate all possible combinations and permutations from a string with filters.","keywords":["combinations","permutations","string","generator"],"author":{"name":"Cabdi Waaxid Siciid"},"license":"MIT","readme":"# string-combinations\n\nGenerate all possible combinations and permutations from a string.\n\nThis utility can also filter results using start/end rules and control result length.\n\n---\n\n## Installation\n\nInstall from NPM\n\n```bash\nnpm install @cabdi_waaxid/combinations\n```\n\nExample usage:\n\n```js\nconst combinations = require(\"@cabdi_waaxid/combinations\")\n\nconst result = combinations(\"abc\")\n\nconsole.log(result)\n```\n\n---\n\n## Output Example\n\nInput:\n\n```js\ncombinations(\"abc\")\n```\n\nOutput:\n\n```\n[\n\"a\",\n\"b\",\n\"c\",\n\"ab\",\n\"ac\",\n\"ba\",\n\"bc\",\n\"ca\",\n\"cb\",\n\"abc\",\n\"acb\",\n\"bac\",\n\"bca\",\n\"cab\",\n\"cba\"\n]\n```\n\n---\n\n## Options\n\nYou can control the generator using options.\n\n```js\ncombinations(\"abc\", options)\n```\n\n### Available Options\n\n| option | description |\n|------|-------------|\n| minLength | minimum result length |\n| maxLength | maximum result length |\n| unique | remove duplicate results |\n| sort | enable sorting |\n| order | \"asc\" or \"desc\" sorting |\n| startsWith | only include results starting with value |\n| endsWith | only include results ending with value |\n| notStartsWith | exclude results starting with value |\n| notEndsWith | exclude results ending with value |\n\n---\n\n## Examples\n\n### Limit length\n\n```js\ncombinations(\"abcd\", {\n  minLength: 2,\n  maxLength: 3\n})\n```\n\n---\n\n### Start filter\n\n```js\ncombinations(\"abcd\", {\n  startsWith: \"a\"\n})\n```\n\n---\n\n### End filter\n\n```js\ncombinations(\"abcd\", {\n  endsWith: \"d\"\n})\n```\n\n---\n\n### Exclude start\n\n```js\ncombinations(\"abcd\", {\n  notStartsWith: \"b\"\n})\n```\n\n---\n\n### Start and end filter\n\n```js\ncombinations(\"abcd\", {\n  startsWith: \"a\",\n  endsWith: \"d\"\n})\n```\n\n---\n\n## Complexity\n\nThe algorithm generates permutations, so complexity is approximately:\n\nO(n!)\n\nAvoid very long strings.\n\n---\n\n## License\n\nMIT","readmeFilename":"README.md","_rev":"1-7f41d63e5ec145cfb00cfb4922f14e32"}