Files
assets
bin
node_modules
.bin
ansi-colors
ansi-gray
ansi-regex
ansi-wrap
anymatch
append-buffer
archy
arr-diff
arr-filter
arr-flatten
arr-map
arr-union
array-each
array-initial
array-last
array-slice
array-sort
array-unique
assign-symbols
async-done
async-each
async-settle
atob
bach
balanced-match
base
binary-extensions
brace-expansion
braces
buffer-equal
buffer-from
cache-base
call-bind
camelcase
chokidar
class-utils
cliui
clone
clone-buffer
clone-stats
cloneable-readable
code-point-at
collection-map
collection-visit
color-support
component-emitter
concat-map
concat-stream
convert-source-map
copy-descriptor
copy-props
core-util-is
d
debug
decamelize
decode-uri-component
default-compare
default-resolution
define-properties
define-property
detect-file
duplexify
each-props
end-of-stream
error-ex
es5-ext
es6-iterator
es6-symbol
es6-weak-map
expand-brackets
expand-tilde
ext
extend
extend-shallow
extglob
fancy-log
fast-levenshtein
fill-range
find-up
findup-sync
fined
flagged-respawn
flush-write-stream
for-in
for-own
fragment-cache
fs-mkdirp-stream
fs.realpath
function-bind
get-caller-file
get-intrinsic
get-value
glob
glob-parent
glob-stream
glob-watcher
global-modules
global-prefix
glogg
graceful-fs
gulp
gulp-cli
gulp-sass
gulplog
has
has-property-descriptors
has-symbols
has-value
has-values
homedir-polyfill
hosted-git-info
immutable
inflight
inherits
ini
interpret
invert-kv
is-absolute
is-accessor-descriptor
is-arrayish
is-binary-path
is-buffer
is-core-module
is-data-descriptor
is-descriptor
is-extendable
is-extglob
is-fullwidth-code-point
is-glob
is-negated-glob
is-number
is-plain-object
is-relative
is-unc-path
is-utf8
is-valid-glob
is-windows
isarray
isexe
isobject
json-stable-stringify-without-jsonify
just-debounce
kind-of
last-run
lazystream
lcid
lead
liftoff
load-json-file
index.js
license
package.json
readme.md
lodash.clonedeep
make-iterator
map-cache
map-visit
matchdep
micromatch
minimatch
mixin-deep
ms
mute-stdout
nanomatch
next-tick
normalize-package-data
normalize-path
now-and-later
number-is-nan
object-copy
object-keys
object-visit
object.assign
object.defaults
object.map
object.pick
object.reduce
once
ordered-read-streams
os-locale
parse-filepath
parse-json
parse-node-version
parse-passwd
pascalcase
path-dirname
path-exists
path-is-absolute
path-parse
path-root
path-root-regex
path-type
picocolors
picomatch
pify
pinkie
pinkie-promise
plugin-error
posix-character-classes
pretty-hrtime
process-nextick-args
pump
pumpify
read-pkg
read-pkg-up
readable-stream
readdirp
rechoir
regex-not
remove-bom-buffer
remove-bom-stream
remove-trailing-separator
repeat-element
repeat-string
replace-ext
replace-homedir
require-directory
require-main-filename
resolve
resolve-dir
resolve-options
resolve-url
ret
safe-buffer
safe-regex
sass
semver
semver-greatest-satisfied-range
set-blocking
set-value
snapdragon
snapdragon-node
snapdragon-util
source-map
source-map-js
source-map-resolve
source-map-url
sparkles
spdx-correct
spdx-exceptions
spdx-expression-parse
spdx-license-ids
split-string
stack-trace
static-extend
stream-exhaust
stream-shift
string-width
string_decoder
strip-ansi
strip-bom
supports-preserve-symlinks-flag
sver-compat
through2
through2-filter
time-stamp
to-absolute-glob
to-object-path
to-regex
to-regex-range
to-through
type
typedarray
unc-path-regex
undertaker
undertaker-registry
union-value
unique-stream
unset-value
upath
urix
use
util-deprecate
v8flags
validate-npm-package-license
value-or-function
vinyl
vinyl-fs
vinyl-sourcemap
vinyl-sourcemaps-apply
which
which-module
wrap-ansi
wrappy
xtend
y18n
yargs
yargs-parser
.package-lock.json
public
src
views
.gitignore
LICENSE
README.md
composer.json
composer.lock
gulpfile.js
package-lock.json
package.json
overseer/node_modules/load-json-file

load-json-file Build Status

Read and parse a JSON file

Strips UTF-8 BOM, uses graceful-fs, and throws more helpful JSON errors.

Install

$ npm install --save load-json-file

Usage

const loadJsonFile = require('load-json-file');

loadJsonFile('foo.json').then(json => {
	console.log(json);
	//=> {foo: true}
});

API

loadJsonFile(filepath)

Returns a promise that resolves to the parsed JSON.

loadJsonFile.sync(filepath)

Returns the parsed JSON.

License

MIT © Sindre Sorhus