Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-resource

Package Overview
Dependencies
Maintainers
2
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-resource - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

18

dist/vue-resource.js
/**
* vue-resource v0.1.6
* vue-resource v0.1.7
* https://github.com/vuejs/vue-resource

@@ -7,3 +7,13 @@ * Released under the MIT License.

/******/ (function(modules) { // webpackBootstrap
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define(factory);
else if(typeof exports === 'object')
exports["VueResource"] = factory();
else
root["VueResource"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache

@@ -752,2 +762,4 @@ /******/ var installedModules = {};

/***/ }
/******/ ]);
/******/ ])
});
;

4

dist/vue-resource.min.js
/**
* vue-resource v0.1.6
* vue-resource v0.1.7
* https://github.com/vuejs/vue-resource

@@ -7,2 +7,2 @@ * Released under the MIT License.

!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){function r(t){t.url=n(1)(t),t.http=n(3)(t),t.resource=n(5)(t)}window.Vue&&Vue.use(r),t.exports=r},function(t,e,n){t.exports=function(t){function e(t,n){var r,a={},i={},c=t;return s.isPlainObject(c)||(c={url:t,params:n}),c=s.extend({},e.options,s.options("url",this,c)),t=c.url.replace(/:([a-z]\w*)/gi,function(t,e){return c.params[e]?(a[e]=!0,o(c.params[e])):""}),"string"!=typeof c.root||t.match(/^(https?:)?\//)||(t=c.root+"/"+t),t=t.replace(/([^:])[\/]{2,}/g,"$1/"),t=t.replace(/(\w+)\/+$/,"$1"),s.each(c.params,function(t,e){a[e]||(i[e]=t)}),r=e.params(i),r&&(t+=(-1==t.indexOf("?")?"?":"&")+r),t}function r(t,e,n){var o,a=s.isArray(e),i=s.isPlainObject(e);s.each(e,function(e,c){o=s.isObject(e)||s.isArray(e),n&&(c=n+"["+(i||o?c:"")+"]"),!n&&a?t.add(e.name,e.value):o?r(t,e,c):t.add(c,e)})}function o(t){return a(t,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function a(t,e){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,e?"%20":"+")}var s=n(2)(t);return e.options={url:"",params:{}},e.params=function(t){var e=[];return e.add=function(t,e){s.isFunction(e)&&(e=e()),null===e&&(e=""),this.push(o(t)+"="+o(e))},r(e,t),e.join("&")},e.parse=function(t){var e=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?"),n=t.match(e);return{url:t,scheme:n[1]||"",host:n[2]||"",path:n[3]||"",query:n[4]||"",fragment:n[5]||""}},Object.defineProperty(t.prototype,"$url",{get:function(){return s.extend(e.bind(this),e)}}),e}},function(t,e){t.exports=function(t){function e(t,r,o){for(var a in r)o&&(n.isPlainObject(r[a])||n.isArray(r[a]))?(n.isPlainObject(r[a])&&!n.isPlainObject(t[a])&&(t[a]={}),n.isArray(r[a])&&!n.isArray(t[a])&&(t[a]=[]),e(t[a],r[a],o)):void 0!==r[a]&&(t[a]=r[a])}var n=t.util.extend({},t.util);return n.options=function(t,e,r){var o=e.$options||{};return n.extend({},o[t],r)},n.each=function(t,e){var r,o;if("number"==typeof t.length)for(r=0;r<t.length;r++)e.call(t[r],t[r],r);else if(n.isObject(t))for(o in t)t.hasOwnProperty(o)&&e.call(t[o],t[o],o);return t},n.extend=function(t){var n,r=[],o=r.slice.call(arguments,1);return"boolean"==typeof t&&(n=t,t=o.shift()),o.forEach(function(r){e(t,r,n)}),t},n.isFunction=function(t){return t&&"function"==typeof t},n}},function(t,e,n){t.exports=function(t){function e(n,i){var c,u,p=this;return i=i||{},s.isPlainObject(n)&&(i=n,n=""),c=s.extend({},e.headers.common,e.headers[i.method.toLowerCase()]),i=s.extend(!0,{url:n,headers:c},e.options,s.options("http",this,i)),s.isPlainObject(i.data)&&/^(get|jsonp)$/i.test(i.method)&&(s.extend(i.params,i.data),i.data=""),u=("jsonp"==i.method.toLowerCase()?o:r).call(this,this.$url||t.url,i).then(a,a),u.success=function(t){return u.then(function(e){t.call(p,e.data,e.status,e)}),u},u.error=function(t){return u["catch"](function(e){t.call(p,e.data,e.status,e)}),u},u.always=function(t){var e=function(e){t.call(p,e.data,e.status,e)};return u.then(e,e),u},i.success&&u.success(i.success),i.error&&u.error(i.error),u}function r(t,e){var n=new XMLHttpRequest;s.isFunction(e.beforeSend)&&e.beforeSend(n,e),e.emulateHTTP&&/^(put|patch|delete)$/i.test(e.method)&&(e.headers["X-HTTP-Method-Override"]=e.method,e.method="post"),e.emulateJSON&&s.isPlainObject(e.data)&&(e.headers["Content-Type"]="application/x-www-form-urlencoded",e.data=t.params(e.data)),s.isObject(e.data)&&/FormData/i.test(e.data.toString())&&delete e.headers["Content-Type"],s.isPlainObject(e.data)&&(e.data=JSON.stringify(e.data));var r=new i(function(r,o){n.open(e.method,t(e),!0),s.each(e.headers,function(t,e){n.setRequestHeader(e,t)}),n.onreadystatechange=function(){4===this.readyState&&(this.status>=200&&this.status<300?r(this):o(this))},n.send(e.data)});return s.extend(r,{abort:function(){n.abort()}}),r}function o(t,e){var n,r,o="_jsonp"+Math.random().toString(36).substr(2);e.params[e.jsonp]=o,s.isFunction(e.beforeSend)&&e.beforeSend({},e);var a=new i(function(a,s){n=document.createElement("script"),n.src=t(e.url,e.params),n.type="text/javascript",n.async=!0,window[o]=function(t){r=t};var i=function(t){delete window[o],document.body.removeChild(n),"load"!==t.type||r||(t.type="error");var e=r?r:t.type,i="error"===t.type?404:200;(200===i?a:s)({responseText:e,status:i})};n.onload=i,n.onerror=i,document.body.appendChild(n)});return a}function a(t){try{t.data=JSON.parse(t.responseText)}catch(e){t.data=t.responseText}return t}var s=n(2)(t),i=n(4),c={"Content-Type":"application/json;charset=utf-8"};return e.options={method:"get",params:{},data:"",jsonp:"callback",beforeSend:null,emulateHTTP:!1,emulateJSON:!1},e.headers={put:c,post:c,patch:c,"delete":c,common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"}},["get","put","post","patch","delete","jsonp"].forEach(function(t){e[t]=function(e,n,r,o){return s.isFunction(n)&&(o=r,r=n,n=void 0),this(e,s.extend({method:t,data:n,success:r},o))}}),Object.defineProperty(t.prototype,"$http",{get:function(){return s.extend(e.bind(this),e)}}),e}},function(t,e){function n(t){t(this.resolve.bind(this),this.reject.bind(this)),this._thens=[]}n.prototype={then:function(t,e,n){this._thens.push({resolve:t,reject:e,progress:n})},"catch":function(t){this._thens.push({reject:t})},resolve:function(t){this._complete("resolve",t)},reject:function(t){this._complete("reject",t)},progress:function(t){for(var e,n=0;e=this._thens[n++];)e.progress&&e.progress(t)},_complete:function(t,e){this.then="resolve"===t?function(t,n){t&&t(e)}:function(t,n){n&&n(e)},this.resolve=this.reject=this.progress=function(){throw new Error("Promise already completed.")};for(var n,r=0;n=this._thens[r++];)n[t]&&n[t](e);delete this._thens}},t.exports=window.Promise?window.Promise:n},function(t,e,n){t.exports=function(t){function e(n,a,s){var i=this,c={};return s=o.extend({},e.actions,s),o.each(s,function(e,s){e=o.extend(!0,{url:n,params:a||{}},e),c[s]=function(){return(i.$http||t.http)(r(e,arguments))}}),c}function r(t,e){var n,r,a,s=o.extend({},t),i={};switch(e.length){case 4:a=e[3],r=e[2];case 3:case 2:if(!o.isFunction(e[1])){i=e[0],n=e[1],r=e[2];break}if(o.isFunction(e[0])){r=e[0],a=e[1];break}r=e[1],a=e[2];case 1:o.isFunction(e[0])?r=e[0]:/^(POST|PUT|PATCH)$/i.test(s.method)?n=e[0]:i=e[0];break;case 0:break;default:throw"Expected up to 4 arguments [params, data, success, error], got "+e.length+" arguments"}return s.url=t.url,s.data=n,s.params=o.extend({},t.params,i),r&&(s.success=r),a&&(s.error=a),s}var o=n(2)(t);return e.actions={get:{method:"GET"},save:{method:"POST"},query:{method:"GET"},remove:{method:"DELETE"},"delete":{method:"DELETE"}},Object.defineProperty(t.prototype,"$resource",{get:function(){return e.bind(this)}}),e}}]);
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports.VueResource=t():e.VueResource=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function r(e){e.url=n(1)(e),e.http=n(3)(e),e.resource=n(5)(e)}window.Vue&&Vue.use(r),e.exports=r},function(e,t,n){e.exports=function(e){function t(e,n){var r,a={},i={},c=e;return s.isPlainObject(c)||(c={url:e,params:n}),c=s.extend({},t.options,s.options("url",this,c)),e=c.url.replace(/:([a-z]\w*)/gi,function(e,t){return c.params[t]?(a[t]=!0,o(c.params[t])):""}),"string"!=typeof c.root||e.match(/^(https?:)?\//)||(e=c.root+"/"+e),e=e.replace(/([^:])[\/]{2,}/g,"$1/"),e=e.replace(/(\w+)\/+$/,"$1"),s.each(c.params,function(e,t){a[t]||(i[t]=e)}),r=t.params(i),r&&(e+=(-1==e.indexOf("?")?"?":"&")+r),e}function r(e,t,n){var o,a=s.isArray(t),i=s.isPlainObject(t);s.each(t,function(t,c){o=s.isObject(t)||s.isArray(t),n&&(c=n+"["+(i||o?c:"")+"]"),!n&&a?e.add(t.name,t.value):o?r(e,t,c):e.add(c,t)})}function o(e){return a(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function a(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}var s=n(2)(e);return t.options={url:"",params:{}},t.params=function(e){var t=[];return t.add=function(e,t){s.isFunction(t)&&(t=t()),null===t&&(t=""),this.push(o(e)+"="+o(t))},r(t,e),t.join("&")},t.parse=function(e){var t=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?"),n=e.match(t);return{url:e,scheme:n[1]||"",host:n[2]||"",path:n[3]||"",query:n[4]||"",fragment:n[5]||""}},Object.defineProperty(e.prototype,"$url",{get:function(){return s.extend(t.bind(this),t)}}),t}},function(e,t){e.exports=function(e){function t(e,r,o){for(var a in r)o&&(n.isPlainObject(r[a])||n.isArray(r[a]))?(n.isPlainObject(r[a])&&!n.isPlainObject(e[a])&&(e[a]={}),n.isArray(r[a])&&!n.isArray(e[a])&&(e[a]=[]),t(e[a],r[a],o)):void 0!==r[a]&&(e[a]=r[a])}var n=e.util.extend({},e.util);return n.options=function(e,t,r){var o=t.$options||{};return n.extend({},o[e],r)},n.each=function(e,t){var r,o;if("number"==typeof e.length)for(r=0;r<e.length;r++)t.call(e[r],e[r],r);else if(n.isObject(e))for(o in e)e.hasOwnProperty(o)&&t.call(e[o],e[o],o);return e},n.extend=function(e){var n,r=[],o=r.slice.call(arguments,1);return"boolean"==typeof e&&(n=e,e=o.shift()),o.forEach(function(r){t(e,r,n)}),e},n.isFunction=function(e){return e&&"function"==typeof e},n}},function(e,t,n){e.exports=function(e){function t(n,i){var c,u,p=this;return i=i||{},s.isPlainObject(n)&&(i=n,n=""),c=s.extend({},t.headers.common,t.headers[i.method.toLowerCase()]),i=s.extend(!0,{url:n,headers:c},t.options,s.options("http",this,i)),s.isPlainObject(i.data)&&/^(get|jsonp)$/i.test(i.method)&&(s.extend(i.params,i.data),i.data=""),u=("jsonp"==i.method.toLowerCase()?o:r).call(this,this.$url||e.url,i).then(a,a),u.success=function(e){return u.then(function(t){e.call(p,t.data,t.status,t)}),u},u.error=function(e){return u["catch"](function(t){e.call(p,t.data,t.status,t)}),u},u.always=function(e){var t=function(t){e.call(p,t.data,t.status,t)};return u.then(t,t),u},i.success&&u.success(i.success),i.error&&u.error(i.error),u}function r(e,t){var n=new XMLHttpRequest;s.isFunction(t.beforeSend)&&t.beforeSend(n,t),t.emulateHTTP&&/^(put|patch|delete)$/i.test(t.method)&&(t.headers["X-HTTP-Method-Override"]=t.method,t.method="post"),t.emulateJSON&&s.isPlainObject(t.data)&&(t.headers["Content-Type"]="application/x-www-form-urlencoded",t.data=e.params(t.data)),s.isObject(t.data)&&/FormData/i.test(t.data.toString())&&delete t.headers["Content-Type"],s.isPlainObject(t.data)&&(t.data=JSON.stringify(t.data));var r=new i(function(r,o){n.open(t.method,e(t),!0),s.each(t.headers,function(e,t){n.setRequestHeader(t,e)}),n.onreadystatechange=function(){4===this.readyState&&(this.status>=200&&this.status<300?r(this):o(this))},n.send(t.data)});return s.extend(r,{abort:function(){n.abort()}}),r}function o(e,t){var n,r,o="_jsonp"+Math.random().toString(36).substr(2);t.params[t.jsonp]=o,s.isFunction(t.beforeSend)&&t.beforeSend({},t);var a=new i(function(a,s){n=document.createElement("script"),n.src=e(t.url,t.params),n.type="text/javascript",n.async=!0,window[o]=function(e){r=e};var i=function(e){delete window[o],document.body.removeChild(n),"load"!==e.type||r||(e.type="error");var t=r?r:e.type,i="error"===e.type?404:200;(200===i?a:s)({responseText:t,status:i})};n.onload=i,n.onerror=i,document.body.appendChild(n)});return a}function a(e){try{e.data=JSON.parse(e.responseText)}catch(t){e.data=e.responseText}return e}var s=n(2)(e),i=n(4),c={"Content-Type":"application/json;charset=utf-8"};return t.options={method:"get",params:{},data:"",jsonp:"callback",beforeSend:null,emulateHTTP:!1,emulateJSON:!1},t.headers={put:c,post:c,patch:c,"delete":c,common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"}},["get","put","post","patch","delete","jsonp"].forEach(function(e){t[e]=function(t,n,r,o){return s.isFunction(n)&&(o=r,r=n,n=void 0),this(t,s.extend({method:e,data:n,success:r},o))}}),Object.defineProperty(e.prototype,"$http",{get:function(){return s.extend(t.bind(this),t)}}),t}},function(e,t){function n(e){e(this.resolve.bind(this),this.reject.bind(this)),this._thens=[]}n.prototype={then:function(e,t,n){this._thens.push({resolve:e,reject:t,progress:n})},"catch":function(e){this._thens.push({reject:e})},resolve:function(e){this._complete("resolve",e)},reject:function(e){this._complete("reject",e)},progress:function(e){for(var t,n=0;t=this._thens[n++];)t.progress&&t.progress(e)},_complete:function(e,t){this.then="resolve"===e?function(e,n){e&&e(t)}:function(e,n){n&&n(t)},this.resolve=this.reject=this.progress=function(){throw new Error("Promise already completed.")};for(var n,r=0;n=this._thens[r++];)n[e]&&n[e](t);delete this._thens}},e.exports=window.Promise?window.Promise:n},function(e,t,n){e.exports=function(e){function t(n,a,s){var i=this,c={};return s=o.extend({},t.actions,s),o.each(s,function(t,s){t=o.extend(!0,{url:n,params:a||{}},t),c[s]=function(){return(i.$http||e.http)(r(t,arguments))}}),c}function r(e,t){var n,r,a,s=o.extend({},e),i={};switch(t.length){case 4:a=t[3],r=t[2];case 3:case 2:if(!o.isFunction(t[1])){i=t[0],n=t[1],r=t[2];break}if(o.isFunction(t[0])){r=t[0],a=t[1];break}r=t[1],a=t[2];case 1:o.isFunction(t[0])?r=t[0]:/^(POST|PUT|PATCH)$/i.test(s.method)?n=t[0]:i=t[0];break;case 0:break;default:throw"Expected up to 4 arguments [params, data, success, error], got "+t.length+" arguments"}return s.url=e.url,s.data=n,s.params=o.extend({},e.params,i),r&&(s.success=r),a&&(s.error=a),s}var o=n(2)(e);return t.actions={get:{method:"GET"},save:{method:"POST"},query:{method:"GET"},remove:{method:"DELETE"},"delete":{method:"DELETE"}},Object.defineProperty(e.prototype,"$resource",{get:function(){return t.bind(this)}}),t}}])});
{
"name": "vue-resource",
"version": "0.1.6",
"version": "0.1.7",
"description": "A web request service for Vue.js",

@@ -25,4 +25,4 @@ "main": "src/index.js",

"devDependencies": {
"webpack": "^1.10.0"
"webpack": "^1.10.1"
}
}

Sorry, the diff of this file is not supported yet

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