【文件属性】:
文件名称:to-object-path:从字符串列表或数组创建对象路径(点表示法)
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-31 04:24:26
JavaScript
到对象路径
从字符串列表或数组创建对象路径。
安装
使用安装
$ npm i to-object-path --save
用法
var toPath = require ( 'to-object-path' ) ;
toPath ( 'foo' , 'bar' , 'baz' ) ;
toPath ( 'foo' , [ 'bar' , 'baz' ] ) ;
//=> 'foo.bar.baz'
还支持传递参数对象(无需切片 args):
function foo ( )
return toPath ( arguments ) ;
}
foo ( 'foo' , 'bar' , 'baz' ) ;
foo ( 'foo' , [ 'bar' , 'baz' ] ) ;
//=> 'foo.bar.baz'
访问以了解如何在应用程序中使用它。
相关项目
:使用属性路径 (
【文件预览】:
to-object-path-master
----.travis.yml(158B)
----index.js(663B)
----test.js(2KB)
----package.json(940B)
----.eslintrc.json(5KB)
----LICENSE(1KB)
----example.js(528B)
----.gitignore(145B)
----.verb.md(823B)
----README.md(2KB)
----.editorconfig(394B)
----.gitattributes(128B)