0.1.0 • Published 4 years ago

load-toml-file v0.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

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