Nietzsche's Preposterous Moustache

npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

promise-json

1.0.2 • Public • Published

promise-json

HTTP GET a json document returning a Promise

js standard style

build status

WARNING: this is not production quality software, use at your own risk

usage

const json = require('promise-json')
json('https://en.wikipedia.org/w/api.php?action=query&titles=Tardigrade&format=json')
  .then(console.log)

api

with jsig type annotation:

json(url: String) => Promise<Object>

Follows redirects. Resolves to JavaScript Object. Rejects on HTTP status >= 400 or JSON parse error.

installation

$ npm install promise-json

running the tests

From package root:

$ npm install
$ npm test

contributors

license

ISC. (c) MMXVI jden jason@denizac.org. See LICENSE.md

install

npm i promise-json

Downloadsweekly downloads

2

version

1.0.2

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

    Report a vulnerability