load-json-file

WebJar for load-json-file

Лицензия

Лицензия

MIT
Категории

Категории

JSON Данные
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

load-json-file
Последняя версия

Последняя версия

5.3.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

load-json-file
WebJar for load-json-file
Ссылка на сайт

Ссылка на сайт

https://www.webjars.org
Система контроля версий

Система контроля версий

https://github.com/sindresorhus/load-json-file

Скачать load-json-file

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/load-json-file/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>load-json-file</artifactId>
    <version>5.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/load-json-file/
implementation 'org.webjars.npm:load-json-file:5.3.0'
// https://jarcasting.com/artifacts/org.webjars.npm/load-json-file/
implementation ("org.webjars.npm:load-json-file:5.3.0")
'org.webjars.npm:load-json-file:jar:5.3.0'
<dependency org="org.webjars.npm" name="load-json-file" rev="5.3.0">
  <artifact name="load-json-file" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='load-json-file', version='5.3.0')
)
libraryDependencies += "org.webjars.npm" % "load-json-file" % "5.3.0"
[org.webjars.npm/load-json-file "5.3.0"]

Зависимости

compile (5)

Идентификатор библиотеки Тип Версия
org.webjars.npm : pify jar [4.0.1,5)
org.webjars.npm : type-fest jar [0.3.0,0.4)
org.webjars.npm : parse-json jar [4.0.0,5)
org.webjars.npm : graceful-fs jar [4.1.15,5)
org.webjars.npm : strip-bom jar [3.0.0,4)

Модули Проекта

Данный проект не имеет модулей.

load-json-file

Read and parse a JSON file

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

Install

$ npm install load-json-file

Usage

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

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

API

loadJsonFile(filePath, options?)

Returns a Promise<unknown> with the parsed JSON.

loadJsonFile.sync(filepath, options?)

Returns the parsed JSON.

options

Type: object

beforeParse

Type: Function

Applies a function to the JSON string before parsing.

reviver

Type: Function

Prescribes how the value originally produced by parsing is transformed, before being returned. See the JSON.parse docs for more.

load-json-file for enterprise

Available as part of the Tidelift Subscription.

The maintainers of load-json-file and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

Related

Версии библиотеки

Версия
5.3.0
4.0.0
2.0.0
1.1.0