slice-ansi:使用ANSI转义码对字符串进行切片

时间:2021-04-29 11:39:51
【文件属性】:
文件名称:slice-ansi:使用ANSI转义码对字符串进行切片
文件大小:7KB
文件格式:ZIP
更新时间:2021-04-29 11:39:51
JavaScript Slice-ansi 使用对字符串进行切片 安装 $ npm install slice-ansi 用法 import chalk from 'chalk' ; import sliceAnsi from 'slice-ansi' ; const string = 'The quick brown ' + chalk . red ( 'fox jumped over ' ) + 'the lazy ' + chalk . green ( 'dog and then ran away with the unicorn.' ) ; console . log ( sliceAnsi ( string , 20 , 30 ) ) ; 原料药 sliceAnsi(string,beginSlice,endSlice?) 细绳 类型: string 带有ANSI转义码的字符串。 像用 。 be
【文件预览】:
slice-ansi-main
----index.js(3KB)
----test.js(4KB)
----package.json(855B)
----readme.md(2KB)
----.github()
--------funding.yml(54B)
--------workflows()
--------security.md(179B)
----license(1KB)
----.gitignore(23B)
----.npmrc(19B)
----.editorconfig(175B)
----.gitattributes(19B)

网友评论