parse jsonp
1.0.0
在 Node.js 和瀏覽器中取得 JSONP 回應的有效負載。這裡沒有fetch
/AJAX 邏輯。
npm 安裝 parse-jsonp
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)
解析(鉤子,jsonp)
如果您有疑問或在使用parse-jsonp
時遇到困難,請先仔細檢查您的程式碼和設定。如果您認為您發現了錯誤或想要提出功能,請參閱問題頁面。