# jasonp **Repository Path**: mirrors_developit/jasonp ## Basic Information - **Project Name**: jasonp - **Description**: An itty bitty JSONP module - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2025-12-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README jasonp [![npm]](http://npm.im/jasonp) [![bower]](http://bower.io/search/?q=jasonp) ====== A tiny module that provides a logical interface for making JSONP requests. > _This is supposed to be funny because my name is Jason._ Usage ----- ##### `jasonp(url, callback) -> (err, ...data)` Make a JSONP request. * The callback is node-style (works nicely with [praline]). * Include a `{{callback}}` placeholder in the URL to replace it with the callback ID. * Requests time out after 10 seconds with `err='Timed out'` Example ------- ```js import get from 'jasonp'; let url = 'http://foo.com/test.json'; get(`${url}?callback={{callback}}`, (err, ...data) => { if (err) return console.error(err); console.log(...data); }); ``` License ------- MIT [npm]: https://img.shields.io/npm/v/jasonp.svg [bower]: https://img.shields.io/bower/v/jasonp.svg [praline]: (https://github.com/developit/praline)