【文件属性】:
文件名称:indent:缩进一个字符串
文件大小:3KB
文件格式:ZIP
更新时间:2021-06-17 02:51:18
JavaScript
缩进
缩进一个字符串。
安装
npm install indent
用法
var indent = require ( 'indent' ) ;
indent ( 'hello\nworld' , 2 ) ;
// " hello\n world"
indent ( 'hello\nworld' , ' ' ) ;
// " hello\n world"
indent ( 'hello\nworld' ) ;
// " hello\n world"
indent ( 'hello\nworld' , '\t' ) ;
// "\thello\n\tworld"
【文件预览】:
indent-master
----.travis.yml(38B)
----LICENSE(1KB)
----test()
--------index.js(827B)
----README.md(676B)
----.editorconfig(243B)
----.gitignore(13B)
----index.js(428B)
----package.json(386B)