https://github.com/hezedu/event-transfer-jsonp
Fixed the callback name. Good for http cache.
https://github.com/hezedu/event-transfer-jsonp
jsonp
Last synced: 10 months ago
JSON representation
Fixed the callback name. Good for http cache.
- Host: GitHub
- URL: https://github.com/hezedu/event-transfer-jsonp
- Owner: hezedu
- License: mit
- Created: 2016-09-24T11:09:34.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-23T09:00:40.000Z (over 9 years ago)
- Last Synced: 2025-08-18T21:50:09.540Z (10 months ago)
- Topics: jsonp
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eventTransferJsonp
It used event to transfer data, fix the callback name. good for http cache.
## install
`npm install event-transfer-jsonp`
The expose name is `eventTransferJsonp`. support AMD,commonjs.
## API
### eventTransferJsonp(url, callback)
## example
```js
eventTransferJsonp('/someurl', function(err, data){
if(err){ //the err just a event
return console.log('error', err);
}
console.log(data);
})
```
## Don't support IE!
## QA
Can i modify the callbackName ?
No