{"id":17049076,"url":"https://github.com/toddself/jsonpject","last_synced_at":"2026-04-28T21:03:05.717Z","repository":{"id":9977674,"uuid":"12004873","full_name":"toddself/jsonpject","owner":"toddself","description":"Provide a JSONP callback if necessary on a remote loaded script","archived":false,"fork":false,"pushed_at":"2014-05-15T20:08:34.000Z","size":148,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-14T20:03:22.735Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toddself.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-09T16:04:02.000Z","updated_at":"2014-05-15T20:08:35.000Z","dependencies_parsed_at":"2022-09-14T05:12:06.027Z","dependency_job_id":null,"html_url":"https://github.com/toddself/jsonpject","commit_stats":null,"previous_names":["condenast/jsonpject"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toddself%2Fjsonpject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toddself%2Fjsonpject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toddself%2Fjsonpject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toddself%2Fjsonpject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toddself","download_url":"https://codeload.github.com/toddself/jsonpject/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245054034,"owners_count":20553436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T09:53:48.652Z","updated_at":"2026-04-28T21:03:00.688Z","avatar_url":"https://github.com/toddself.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![build status](https://secure.travis-ci.org/toddself/jsonpject.png)](http://travis-ci.org/toddself/jsonpject)\n# JSONPject\n\nTakes a JSONP script (one that has a callback=) in the query string and a callback and provides a new script URL specifiying a new callback which wraps the passed in callback.  The included script will call the provided callback, ensuring your callback is only called when the JSONP script has finished loading.\n\n# Usage\nThis sort of assumes you're using something to let you use CommonJS modules on the browser end.\n\n```javascript\nvar jsonpject = require('jsonpject');\n\nfunction my_callback(data){\n    do_something_with(data);\n}\n\nvar jsonp = jsonpject('http://test.com/a_script.js?callback=?');\nwindow[jsonp.fn_name] = jsonp.fn;\nvar scr = document.createElement('script');\nscr.src = jsonp.url;\ndocument.head.appendChild(scr);\n```\n\n# Testing\n\nUses grunt to do testing. Test is available from npm\n\n`npm install`\n`npm test`\n\n# License\nJSONPject is provided under the terms of the [MIT License](/LICENSE)\nCopyright 2013 Condé Nast","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoddself%2Fjsonpject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoddself%2Fjsonpject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoddself%2Fjsonpject/lists"}