1.8.5 • Published 3 years ago

load-object v1.8.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

load-object

npm package Coverage Status GitHub last commit Snyk Vulnerabilities for npm package NPM

Libraries.io dependency status for GitHub repo

load-object is a useful node.js utility package for loading data. load-object loads data into a Javascript object from JSON, YAML, TOML, CBOR, Dhall, XML, HTML and Markdown both locally and remotely, thereby removing the need to manually pass the files to different parsers.

Issues:

  • Dhall will probably only work on Linux and if you have dhall-to-json installed as it depends on native bindings. A resolution is planned for this by rewriting in Purescript.

Installation

npm install load-object

Usage

ES Modules

import { load } from "load-object"

Use Locally

// Should have one of these extensions: .json, .yaml, .yml, .dhall, .toml, .md, .cbor
const filePath = "./openapi.json"
const object  = load(filePath)

Use Remotely

// Should have one of these extensions: .json, .yaml, .yml, .dhall, .toml, .md
const url = "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json"
const object = load(url)
1.8.2

3 years ago

1.8.1

3 years ago

1.7.10

3 years ago

1.7.11

3 years ago

1.7.12

3 years ago

1.7.13

3 years ago

1.7.9

3 years ago

1.7.8

3 years ago

1.7.7

3 years ago

1.7.6

3 years ago

1.7.5

3 years ago

1.8.5

3 years ago

1.8.4

3 years ago

1.8.3

3 years ago

1.7.4

3 years ago

1.7.3

3 years ago

1.7.2

3 years ago

1.7.1

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.3

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.28

3 years ago

0.0.27

3 years ago

0.0.26

3 years ago

0.0.25

3 years ago

0.0.24

3 years ago

0.0.23

3 years ago

0.0.22

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.1

3 years ago