0.0.5 • Published 6 years ago

jsonp-simple v0.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

jsonp-simple

npm npm CircleCI Codecov cdn

simple and thin promisify jsonp

Usage

Browser

<script src="https://cdn.jsdelivr.net/npm/jsonp-simple/dist/jsonp-simple.min.js"></script>
<script>
  jsonpSimple("https://api.github.com/repos/kthjm/jsonp-simple")
  .then((res) => console.log(res))
  .catch((err) => console.error(err))
</script>

Node (bundle for Browser)

yarn add jsonp-simple
import jsonp from "jsonp-simple"

jsonp("https://api.github.com/repos/kthjm/jsonp-simple")
.then((res) => console.log(res))
.catch((err) => console.error(err))

API

jsonp(src[, timeout])

src: string

timeout: number = 2000

error

timeout: boolean

onerror: Event | false

License

MIT (http://opensource.org/licenses/MIT)

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago