New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jullius

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jullius - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

18

dist/jullius.js

@@ -1,2 +0,2 @@

/*! jullius v0.0.2 | (c) 2016 @pinceladasdaweb | https://github.com/pinceladasdaweb/jullius */
/*! jullius v0.0.3 | (c) 2016 @pinceladasdaweb | https://github.com/pinceladasdaweb/jullius */
(function (root, factory) {

@@ -31,3 +31,15 @@ "use strict";

var jullius = function(url) {
var buildQuery = function (params) {
var query = '', key;
for (key in params) {
if(params.hasOwnProperty(key)) {
query += encodeURIComponent(key) + "=" + encodeURIComponent(params[key]) + "&"
}
};
return query;
};
var jullius = function(url, params) {
return new Promise(function(resolve, reject) {

@@ -45,3 +57,3 @@ if (typeof url !== 'string') {

script = extScript.cloneNode();
script.src = url + (url.indexOf('?') >= 0 ? '&' : '?') + 'callback=' + name;
script.src = url + (url.indexOf('?') >= 0 ? '&' : '?') + buildQuery(params) + 'callback=' + name;
script.id = name;

@@ -48,0 +60,0 @@ script.async = true;

4

dist/jullius.min.js

@@ -1,2 +0,2 @@

/*! jullius v0.0.2 | (c) 2016 @pinceladasdaweb | https://github.com/pinceladasdaweb/jullius */
!function(e,t){"use strict";"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.jullius=t()}(this,function(){"use strict";var e=function(){return"jullius_"+Date.now()+"_"+Math.ceil(1e5*Math.random())},t=function(e){try{delete window[e]}catch(t){window[e]=void 0}},n=function(e){var t=document.getElementById(e);t.parentNode.removeChild(t)},o=function(o){return new Promise(function(i,d){"string"!=typeof o&&d("You need pass a valid url!!!");var r,c,a,u=e();r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script"),a.type="text/javascript",c=a.cloneNode(),c.src=o+(o.indexOf("?")>=0?"&":"?")+"callback="+u,c.id=u,c.async=!0,r.appendChild(c),window[u]=function(e){i(e),t(u)},n(u),c.addEventListener("error",d)})};return o});
/*! jullius v0.0.3 | (c) 2016 @pinceladasdaweb | https://github.com/pinceladasdaweb/jullius */
!function(e,n){"use strict";"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?module.exports=n():e.jullius=n()}(this,function(){"use strict";var e=function(){return"jullius_"+Date.now()+"_"+Math.ceil(1e5*Math.random())},n=function(e){try{delete window[e]}catch(n){window[e]=void 0}},t=function(e){var n=document.getElementById(e);n.parentNode.removeChild(n)},o=function(e){var n,t="";for(n in e)e.hasOwnProperty(n)&&(t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n])+"&");return t},i=function(i,r){return new Promise(function(d,c){"string"!=typeof i&&c("You need pass a valid url!!!");var a,u,s,f=e();a=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script"),s.type="text/javascript",u=s.cloneNode(),u.src=i+(i.indexOf("?")>=0?"&":"?")+o(r)+"callback="+f,u.id=f,u.async=!0,a.appendChild(u),window[f]=function(e){d(e),n(f)},t(f),u.addEventListener("error",c)})};return i});
{
"name": "jullius",
"version": "0.0.2",
"version": "0.0.3",
"description": "Light weight library to manage JSONP calls using Promises",

@@ -5,0 +5,0 @@ "author": "@pinceladasdaweb",

@@ -26,3 +26,6 @@ # jullius

<script>
jullius('http://www.pinceladasdaweb.com.br/blog/?json=get_recent_posts')
jullius('http://www.pinceladasdaweb.com.br/blog/', {
json: 'get_recent_posts',
count: 5
})
.then(function(data) {

@@ -47,2 +50,6 @@ console.dir(data);

##Options
* url: (string) (required) URL for the JSONP resource.
* params: (object) (optional) Object used to generate GET query parameters for the JSONP resource.
##Browser Support

@@ -49,0 +56,0 @@

@@ -30,3 +30,15 @@ (function (root, factory) {

var jullius = function(url) {
var buildQuery = function (params) {
var query = '', key;
for (key in params) {
if(params.hasOwnProperty(key)) {
query += encodeURIComponent(key) + "=" + encodeURIComponent(params[key]) + "&"
}
};
return query;
};
var jullius = function(url, params) {
return new Promise(function(resolve, reject) {

@@ -44,3 +56,3 @@ if (typeof url !== 'string') {

script = extScript.cloneNode();
script.src = url + (url.indexOf('?') >= 0 ? '&' : '?') + 'callback=' + name;
script.src = url + (url.indexOf('?') >= 0 ? '&' : '?') + buildQuery(params) + 'callback=' + name;
script.id = name;

@@ -47,0 +59,0 @@ script.async = true;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc