{"_id":"trim-repeated","_rev":"16157","name":"trim-repeated","description":"Trim a consecutively repeated substring: foo--bar---baz → foo-bar-baz","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"npm:sindresorhus","email":""},{"name":"sindresorhus","email":""}],"time":{"modified":"2021-06-03T09:58:58.000Z","created":"2015-01-13T16:27:43.676Z","2.0.0":"2021-04-21T11:42:06.683Z","1.0.0":"2015-01-13T16:27:43.676Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/trim-repeated.git"},"versions":{"2.0.0":{"name":"trim-repeated","version":"2.0.0","description":"Trim a consecutively repeated substring: foo--bar---baz → foo-bar-baz","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/trim-repeated.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava"},"keywords":["condense","collapse","compact","consecutive","repeated","string","str","trim","remove","strip","character","char"],"dependencies":{"escape-string-regexp":"^5.0.0"},"devDependencies":{"ava":"^3.15.0","xo":"^0.39.1"},"gitHead":"cf74c2b84720a9d08d95ff417fe6a28ada8323d1","bugs":{"url":"https://github.com/sindresorhus/trim-repeated/issues"},"homepage":"https://github.com/sindresorhus/trim-repeated#readme","_id":"trim-repeated@2.0.0","_nodeVersion":"12.22.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"5d60556d6d40d9461b7c7e06c3ac20b6b1d50090","size":1607,"noattachment":false,"key":"/trim-repeated/-/trim-repeated-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/trim-repeated/download/trim-repeated-2.0.0.tgz"},"directories":{},"maintainers":[{"name":"npm:sindresorhus","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trim-repeated_2.0.0_1619005326560_0.9269455216895233"},"_hasShrinkwrap":false,"publish_time":1619005326683,"_cnpm_publish_time":1619005326683},"1.0.0":{"name":"trim-repeated","version":"1.0.0","description":"Trim a consecutively repeated substring: foo--bar---baz → foo-bar-baz","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/trim-repeated"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["condense","collapse","compact","consecutive","repeated","string","str","trim","remove","strip","character","char"],"dependencies":{"escape-string-regexp":"^1.0.2"},"devDependencies":{"ava":"0.0.4"},"gitHead":"df1e5af5f88117f1c9f1624aeb083d014ceef308","bugs":{"url":"https://github.com/sindresorhus/trim-repeated/issues"},"homepage":"https://github.com/sindresorhus/trim-repeated","_id":"trim-repeated@1.0.0","_shasum":"e3646a2ea4e891312bf7eace6cfb05380bc01c21","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"npm:sindresorhus","email":""},{"name":"sindresorhus","email":""}],"dist":{"shasum":"e3646a2ea4e891312bf7eace6cfb05380bc01c21","size":1700,"noattachment":false,"key":"/trim-repeated/-/trim-repeated-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/trim-repeated/download/trim-repeated-1.0.0.tgz"},"directories":{},"publish_time":1421166463676,"_cnpm_publish_time":1421166463676,"_hasShrinkwrap":false}},"readme":"# trim-repeated\n\n> Trim a consecutively repeated substring: `foo--bar---baz` → `foo-bar-baz`\n\n## Install\n\n```\n$ npm install trim-repeated\n```\n\n## Usage\n\n```js\nimport trimRepeated from 'trim-repeated';\n\ntrimRepeated('foo--bar---baz', '-');\n//=> 'foo-bar-baz'\n\ntrimRepeated('foo@#@#baz', '@#');\n//=> 'foo@#baz'\n```\n\n### trimRepeated(input, target)\n\n#### input\n\n*Required*\\\nType: `string`\n\n#### target\n\n*Required*\\\nType: `string`\n\nSubstring to trim.\n\n## Related\n\n- [`condense-whitespace`](https://github.com/sindresorhus/condense-whitespace) - Remove leading, trailing and repeated whitespace from a string\n","_attachments":{},"homepage":"https://github.com/sindresorhus/trim-repeated#readme","bugs":{"url":"https://github.com/sindresorhus/trim-repeated/issues"},"license":"MIT"}