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) => 구문 분석('콜백', jsonp)).then(console.log, console.error)
구문 분석(훅, jsonp)
만약 질문이 있거나 parse-jsonp
사용에 어려움이 있다면, 먼저 코드와 설정을 다시 한번 확인해주세요. 버그를 발견했다고 생각하거나 기능을 제안하고 싶다면 이슈 페이지를 참조하세요.