MCPcopy
hub / github.com/webmodules/jsonp

github.com/webmodules/jsonp @0.2.1 sqlite

repository ↗ · DeepWiki ↗ · release 0.2.1 ↗
4 symbols 7 edges 2 files 2 documented · 50%
README

jsonp

A simple JSONP implementation.

saucelabs

Installation

Install for node.js or browserify using npm:

$ npm install jsonp

Install for component(1) using component:

$ component install LearnBoost/jsonp

Install for browser using bower:

$ bower install jsonp

API

jsonp(url, opts, fn)

  • url (String) url to fetch
  • opts (Object), optional
  • param (String) name of the query string parameter to specify the callback (defaults to callback)
  • timeout (Number) how long after a timeout error is emitted. 0 to disable (defaults to 60000)
  • prefix (String) prefix for the global callback functions that handle jsonp responses (defaults to __jp)
  • name (String) name of the global callback functions that handle jsonp responses (defaults to prefix + incremented counter)
  • fn callback

The callback is called with err, data parameters.

If it times out, the err will be an Error object whose message is Timeout.

Returns a function that, when called, will cancel the in-progress jsonp request (fn won't be called).

License

MIT

Core symbols most depended-on inside this repo

jsonp
called by 3
index.js
cleanup
called by 3
index.js
noop
called by 0
index.js
cancel
called by 0
index.js

Shape

Function 4

Languages

TypeScript100%

Modules by API surface

index.js4 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

debug2.1.3 · 1×
tape3.5.0 · 1×
zuul1.17.1 · 1×

For agents

$ claude mcp add jsonp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact