Get the payload of a JSONP response.
npm install parse-jsonpGet the payload of a JSONP response in Node.js and in the browser. No fetch/AJAX logic in here.


!ISC-licensed


``shell`
npm install parse-jsonp
`js
const {fetch} = require('fetch-ponyfill')()
const parse = require('parse-jsonp')
fetch('some-JSONP-url.js')
.then((res) => res.text())
.then((jsonp) => parse('callback', jsonp))
.then(console.log, console.error)
`
`js`
parse(hook, jsonp)
If you have a question or have difficulties using parse-jsonp`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.