0.1.0 • Published 4 years ago
load-toml-file v0.1.0
Load TOML file
Read and parse a TOML file.
Strips UTF-8 BOM and uses graceful-fs
.
Installation
npm install --save load-toml-file
Usage
const loadTomlFile = require('load-toml-file')
loadTomlFile('foo.toml').then(data => {
console.log(data)
//=> { foo: { bar: 'baz' } }
})
API
loadTomlFile(filepath)
Returns a promise for the parsed TOML.
loadTomlFile.sync(filepath)
Returns the parsed TOML.
Related
- load-yaml-file - Read and parse a YAML file
- load-json-file - Read and parse a JSON file
0.1.0
4 years ago