【文件属性】:
文件名称:read-yaml-promise:承诺读取和解析YAML文件
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-24 10:33:19
JavaScript
阅读Yaml承诺
读取和解析文件
var readYaml = require ( 'read-yaml-promise' ) ;
// fixture.yaml
// - 'foo'
// - false
readYaml ( 'fixture.yaml' )
. then ( function ( data ) {
data ; //=> ['foo', false]
} )
. catch ( function ( err ) {
console . log ( err . message ) ;
} ) ;
安装
npm install read-yaml-promise
原料药
var readYaml = require ( 'read-yaml-promise' ) ;
readYaml( filePath [, options ])
filePath :
【文件预览】:
read-yaml-promise-master
----.gitignore(22B)
----README.md(3KB)
----appveyor.yml(354B)
----test()
--------fixture.yaml(7B)
--------test.js(2KB)
--------fixture-ucs2.yaml(14B)
----LICENSE(1KB)
----.gitattributes(12B)
----package.json(1KB)
----index.js(489B)
----.travis.yml(169B)
----.editorconfig(188B)