trim-repeated:修剪连续重复的子字符串

时间:2021-04-28 14:28:38
【文件属性】:
文件名称:trim-repeated:修剪连续重复的子字符串
文件大小:4KB
文件格式:ZIP
更新时间:2021-04-28 14:28:38
JavaScript 修剪重复 修剪连续重复的子字符串: foo--bar---baz → foo-bar-baz 安装 $ npm install trim-repeated 用法 import trimRepeated from 'trim-repeated' ; trimRepeated ( 'foo--bar---baz' , '-' ) ; //=> 'foo-bar-baz' trimRepeated ( 'foo@#@#baz' , '@#' ) ; //=> 'foo@#baz' trimRepeated(输入,目标) 输入 必需的类型: string 目标 必需的类型: string 子串进行修剪。 有关的 从字符串中删除前导,尾随和重复的空格
【文件预览】:
trim-repeated-main
----.gitattributes(19B)
----.github()
--------workflows()
----test.js(418B)
----license(1KB)
----.npmrc(19B)
----.editorconfig(175B)
----.gitignore(23B)
----index.js(339B)
----readme.md(606B)
----package.json(762B)

网友评论