1.8.5 • Published 1 year ago

load-object v1.8.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

1.8.1

1 year ago

1.7.10

1 year ago

1.7.11

1 year ago

1.7.12

1 year ago

1.7.13

1 year ago

1.7.9

1 year ago

1.7.8

1 year ago

1.7.7

1 year ago

1.7.6

1 year ago

1.7.5

1 year ago

1.8.5

1 year ago

1.8.4

1 year ago

1.8.3

1 year ago

1.7.4

2 years ago

1.7.3

2 years ago

1.7.2

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.3

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.1.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.28

2 years ago

0.0.27

2 years ago

0.0.26

2 years ago

0.0.25

2 years ago

0.0.24

2 years ago

0.0.23

2 years ago

0.0.22

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.1

2 years ago