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

@meanie/angular-api

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@meanie/angular-api - npm Package Compare versions

Comparing version 3.4.1 to 3.4.2

2

package.json
{
"name": "@meanie/angular-api",
"description": "An Angular service for interaction with API's",
"version": "3.4.1",
"version": "3.4.2",
"homepage": "https://github.com/meanie/angular-api",

@@ -6,0 +6,0 @@ "author": {

@@ -244,4 +244,5 @@ /**

model: '',
config: {},
stripTrailingSlashes: true
config: {
stripTrailingSlashes: true
}
};

@@ -317,3 +318,3 @@

this.stripTrailingSlashes = function (strip) {
this.defaults.stripTrailingSlashes = !!strip;
this.setConfig('stripTrailingSlashes', !!strip);
return this;

@@ -320,0 +321,0 @@ };

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

var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t,r,n){"use strict";r.module("Api.Action.Service",["Url.Service"]).factory("$apiAction",["$q","$injector","$log","$url",function(t,n,e,i){function o(t){return t?n.has(t)?t:("$baseModel"!==t&&e.warn("Unknown model class/service:",t),null):null}function s(t,n){if(r.extend(this,t),this.url=i.concat(n.url,this.url||""),this.model=this.model||n.model||!1,this.method=this.method||"GET",this.enforceDataFormat=n.enforceDataFormat||!1,n.config)for(var e in n.config)n.config.hasOwnProperty(e)&&(this[e]=n.config[e]);void 0===this.params&&(this.params=n.params),this.params=this.params||{},this.model=o(this.model)}return s.prototype.hasBody=function(){return/^(POST|PUT|PATCH)$/i.test(this.method)},s.prototype.expectsArray=function(){return Boolean(this.isArray)},s.prototype.expectsModel=function(){return this.model&&Boolean(this.isModel)},s.prototype.convertToModel=function(t){var e=this;return r.isArray(t)?t.map(function(t){return e.convertToModel(t)}):t&&null!==t?new(n.get(this.model))(t):null},s.prototype.parseData=function(t){var n=this.expectsArray(),i=this.expectsModel(),o=r.isArray(t);return o!==n&&(e.warn("Expected",n?"array":"object","as response, got",o?"array":void 0===t?"undefined":_typeof(t),"for",this.method,this.url),this.enforceDataFormat&&(t=n?[]:{})),n&&!t?[]:i?this.convertToModel(t):t},s.prototype.successInterceptor=function(t){var r=t.data,n=this.dataKey;if(n){if(void 0===r[n])throw new Error("Unknown data key: "+n);return r[n]=this.parseData(r[n]),r}return this.parseData(r)},s.prototype.errorInterceptor=function(r){return t.reject(r)},function(t,r){return new s(t,r)}}])}(window,window.angular),function(t,r,n){"use strict";r.module("Api.Service",["Api.Endpoint.Service"]).provider("$api",function(){this.defaults={verbose:!1,enforceDataFormat:!1,baseUrl:"/",actions:{query:{method:"GET",isArray:!0,isModel:!0},get:{method:"GET",isModel:!0},create:{method:"POST"},update:{method:"PUT"},delete:{method:"DELETE"}},params:{id:"@id"},model:"",config:{},stripTrailingSlashes:!0},this.endpoints={},this.setVerbose=function(t){return this.defaults.verbose=!!t,this},this.setBaseUrl=function(t){return this.defaults.baseUrl=t.replace(/:([0-9]+)/,"\\:$1"),this},this.setEnforceDataFormat=function(t){return this.defaults.enforceDataFormat=!!t,this},this.setDefaultActions=function(t){return this.defaults.actions=t||{},this},this.setDefaultParams=function(t){return this.defaults.params=t||{},this},this.setDefaultModel=function(t){return this.defaults.model=t||!1,this},this.setConfig=function(t,r){return this.defaults.config[t]=r,this},this.stripTrailingSlashes=function(t){return this.defaults.stripTrailingSlashes=!!t,this},this.registerEndpoint=function(t,r){return t&&(this.endpoints[t]=r||{}),this},this.$get=["$log","$apiEndpoint",function(t,n){var e=this,i=function(t){return this[t]};return r.forEach(this.endpoints,function(o,s){i[s]&&t.warn("API endpoint",s,"is being overwritten."),(o=r.extend({},e.defaults,o)).verbose&&t.info("API endpoint",s+":",o),i[s]=n(s,o)}),i}]})}(window,window.angular);var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t,r,n){"use strict";r.module("BaseModel.Service",[]).factory("$baseModel",["$window","$log","$injector",function(t,n,e){function i(t){var r=/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).*/;if(t.match(r)){var n=a(t,a.ISO_8601,!0);if(n.isValid())return n}return null}function o(t,n){if(r.isArray(t[n])){var e=t[n];return e.map(function(t,r){return o(e,r)})}return t[n]&&r.isFunction(t[n].clone)?t[n].clone():r.copy(t[n])}function s(t,r){var n=r;Object.defineProperty(this,"$parent",{enumerable:!1,get:function(){return n},set:function(t){n=t}}),this.fromJSON(t)}var a=void 0;return e.has("moment")?a=e.get("moment"):void 0!==t.moment&&(a=t.moment),s.prototype.convertToModel=function(t,i,o){var a=this;if("boolean"==typeof i&&(o=i,i=null),void 0===this[t]&&(this[t]=o?[]:null),i&&this[t]){if("string"==typeof i){if(!e.has(i))return n.warn("Unknown model",i,"specified for sub model conversion");i=e.get(i)}this[t]instanceof i||(r.isArray(this[t])?this[t]=this[t].map(function(t){return new i(t,a)}):r.isString(this[t])&&s.isId(this[t])?this[t]=new i({id:this[t]},this):this[t]=new i(this[t],this))}},s.prototype.fromJSON=function(t){var n=this;return r.isObject(t)&&r.forEach(t,function(t,r){n[r]=s.valueFromJSON(t)},this),this},s.prototype.toJSON=function(t){var n={};return t&&r.isObject(t)&&r.forEach(t,function(t,r){n[r]=s.valueToJSON(t)}),r.forEach(this,function(t,r){n.hasOwnProperty(r)||(n[r]=s.valueToJSON(t))}),n},s.prototype.extract=function(t){var n=this;if("string"==typeof t)return o(this,t);var e={};return r.isArray(t)&&t.length?r.forEach(t,function(t){e[t]=o(n,t)}):r.forEach(this,function(t,r){"$$"!==r.substr(0,2)&&(e[r]=o(n,r))}),e},s.prototype.merge=function(t){var n=this;return t&&r.isObject(t)&&r.forEach(t,function(r,e){n[e]=o(t,e)}),this},s.prototype.clear=function(){for(var t in this)this.hasOwnProperty(t)&&delete this[t];return this},s.prototype.clone=function(t,r){var n=new(0,this.constructor)(this.extract(),this.$parent);return t&&delete n.id,r&&"object"===(void 0===r?"undefined":_typeof(r))&&Object.assign(n,r),n},s.prototype.isSame=function(t){return!!t&&(r.isObject(t)?!!t.id&&(this.id&&t.id&&this.id===t.id):this.id===t)},s.prototype.copyProperty=function(t,n){this[n]&&r.isFunction(this[n].clone)?t[n]=this[n].clone():t[n]=r.copy(this[n])},s.prototype.setParent=function(t){this.$parent=t},s.valueFromJSON=function(t){if(r.isArray(t))return t.map(s.valueFromJSON);if(a&&r.isString(t))return i(t)||t;if(t&&r.isObject(t)){if(t._isAMomentObject)return t.clone();var n={};for(var e in t)t.hasOwnProperty(e)&&(n[e]=s.valueFromJSON(t[e]));return n}return t},s.valueToJSON=function(t){if(r.isArray(t))return t.map(s.valueToJSON);if(t&&r.isObject(t)){if(r.isFunction(t.toJSON))return t.toJSON();var n={};for(var e in t)t.hasOwnProperty(e)&&"$$"!==e.substr(0,2)&&(n[e]=s.valueToJSON(t[e]));return n}return t},s.onlyId=function(t){return r.isArray(t)?t.map(s.onlyId):t&&"object"===(void 0===t?"undefined":_typeof(t))&&t.id?t.id:t},s.strip=function(t){for(var n=arguments.length,e=Array(n>1?n-1:0),i=1;i<n;i++)e[i-1]=arguments[i];return r.isArray(t)?t.map(function(t){return s.strip.apply(s,[t].concat(e))}):t&&"object"===(void 0===t?"undefined":_typeof(t))?(r.forEach(t,function(r,n){e.includes(n)||delete t[n]}),t):t},s.stripIds=function(t){return r.isArray(t)?t.map(function(t){return s.stripIds(t)}):t&&"object"===(void 0===t?"undefined":_typeof(t))?(void 0!==t.id&&delete t.id,r.forEach(t,function(t){t&&"object"===(void 0===t?"undefined":_typeof(t))&&s.stripIds(t)}),t):t},s.isId=function(t){return t.match(/^[a-f\d]{24}$/i)},s}])}(window,window.angular),function(t,r,n){"use strict";r.module("Api.Endpoint.Service",["Api.Action.Service","Api.Request.Service","Url.Service"]).factory("$apiEndpoint",["$url","$apiAction","$apiRequest",function(t,n,e){function i(i,o){var s=this;o.actions=o.actions||{},o.url=t.concat(o.baseUrl,o.url||t.concat(i,":id")),this.$config=o,this.$actions={},r.forEach(o.actions,function(t,i){s.$actions[i]=n(t||{},o),s[i]=r.bind(s,e,s.$actions[i])})}return function(t,r){return new i(t,r)}}])}(window,window.angular),function(t,r,n){"use strict";r.module("Api.Request.Service",["Url.Service"]).factory("$apiRequest",["$http","$url",function(t,e){function i(t){return t&&"hasOwnProperty"!==t&&/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/.test("."+t)}function o(t,r){if(!i(r))throw new Error("Invalid dotted path:"+r);for(var e=r.split("."),o=0;o<e.length&&t!==n;o++){var s=e[o];t=null!==t?t[s]:n}return t}function s(t,n,e){var i={};return r.forEach(t||{},function(t,n){r.isFunction(t)&&(t=t()),r.isString(t)&&"@"===t.charAt(0)&&(t=o(e,t.substr(1))),i[n]=t}),r.extend(i,n||{})}function a(t){var n={};return r.forEach(t.split(/\W/),function(r){if("hasOwnProperty"===r)throw new Error("Invalid parameter name: hasOwnProperty");r&&!/^\\d+$/.test(r)&&new RegExp("(^|[^\\\\]):"+r+"(\\W|$)").test(t)&&(n[r]=!0)}),n}function u(t,r){return r&&(t=t.replace(/\/+$/,"")||"/"),t.replace(/\/\.(?=\w+($|\?))/,".").replace(/\/\\\./,"/.")}function c(t,n,i,o){return t=t.replace(/\\:/g,":"),r.forEach(i,function(i,o){var s=n.hasOwnProperty(o)?n[o]:null,a=void 0;if(r.isDefined(s)&&null!==s){var u=e.encodeUriSegment(s);a=new RegExp(":"+o+"(\\W|$)","g"),t=t.replace(a,function(t,r){return u+r})}else a=new RegExp("(/?):"+o+"(\\W|$)","g"),t=t.replace(a,function(t,r,n){return"/"===n.charAt(0)?n:r+n})}),u(t,o)}function f(t,n,e,i){var o={},u=["params","model","isArray","isModel","successInterceptor","errorInterceptor","stripTrailingSlashes"];if(r.forEach(t,function(t,n){-1===u.indexOf(n)&&(o[n]=r.copy(t))}),i&&r.isObject(i)&&r.forEach(i,function(t,n){o[n]=r.copy(t)}),t.hasBody()&&e&&r.isObject(e)&&(r.isFunction(e.toJSON)?o.data=e.toJSON():r.isArray(e)?o.data=e:o.data=r.extend({},e)),(n=r.copy(n))&&r.isObject(n))for(var f in n)n.hasOwnProperty(f)&&r.isObject(n[f])&&r.isFunction(n[f].toJSON)&&(n[f]=n[f].toJSON());n=s(t.params,n,e);var p=a(o.url);return o.url=c(t.url,n,p,t.stripTrailingSlashes),r.forEach(n,function(t,r){p[r]||(o.params=o.params||{},o.params[r]=t)}),o}return function(r,n,e,i){r.hasBody()&&n&&!e&&(e=n,n=null);var o=f(r,n,e,i);return t(o).then(function(t){return r.successInterceptor(t)}).catch(function(t){return r.errorInterceptor(t)})}}])}(window,window.angular);
var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t,n,r){"use strict";n.module("Api.Action.Service",["Url.Service"]).factory("$apiAction",["$q","$injector","$log","$url",function(t,r,e,i){function o(t){return t?r.has(t)?t:("$baseModel"!==t&&e.warn("Unknown model class/service:",t),null):null}function s(t,r){if(n.extend(this,t),this.url=i.concat(r.url,this.url||""),this.model=this.model||r.model||!1,this.method=this.method||"GET",this.enforceDataFormat=r.enforceDataFormat||!1,r.config)for(var e in r.config)r.config.hasOwnProperty(e)&&(this[e]=r.config[e]);void 0===this.params&&(this.params=r.params),this.params=this.params||{},this.model=o(this.model)}return s.prototype.hasBody=function(){return/^(POST|PUT|PATCH)$/i.test(this.method)},s.prototype.expectsArray=function(){return Boolean(this.isArray)},s.prototype.expectsModel=function(){return this.model&&Boolean(this.isModel)},s.prototype.convertToModel=function(t){var e=this;return n.isArray(t)?t.map(function(t){return e.convertToModel(t)}):t&&null!==t?new(r.get(this.model))(t):null},s.prototype.parseData=function(t){var r=this.expectsArray(),i=this.expectsModel(),o=n.isArray(t);return o!==r&&(e.warn("Expected",r?"array":"object","as response, got",o?"array":void 0===t?"undefined":_typeof(t),"for",this.method,this.url),this.enforceDataFormat&&(t=r?[]:{})),r&&!t?[]:i?this.convertToModel(t):t},s.prototype.successInterceptor=function(t){var n=t.data,r=this.dataKey;if(r){if(void 0===n[r])throw new Error("Unknown data key: "+r);return n[r]=this.parseData(n[r]),n}return this.parseData(n)},s.prototype.errorInterceptor=function(n){return t.reject(n)},function(t,n){return new s(t,n)}}])}(window,window.angular),function(t,n,r){"use strict";n.module("Api.Service",["Api.Endpoint.Service"]).provider("$api",function(){this.defaults={verbose:!1,enforceDataFormat:!1,baseUrl:"/",actions:{query:{method:"GET",isArray:!0,isModel:!0},get:{method:"GET",isModel:!0},create:{method:"POST"},update:{method:"PUT"},delete:{method:"DELETE"}},params:{id:"@id"},model:"",config:{stripTrailingSlashes:!0}},this.endpoints={},this.setVerbose=function(t){return this.defaults.verbose=!!t,this},this.setBaseUrl=function(t){return this.defaults.baseUrl=t.replace(/:([0-9]+)/,"\\:$1"),this},this.setEnforceDataFormat=function(t){return this.defaults.enforceDataFormat=!!t,this},this.setDefaultActions=function(t){return this.defaults.actions=t||{},this},this.setDefaultParams=function(t){return this.defaults.params=t||{},this},this.setDefaultModel=function(t){return this.defaults.model=t||!1,this},this.setConfig=function(t,n){return this.defaults.config[t]=n,this},this.stripTrailingSlashes=function(t){return this.setConfig("stripTrailingSlashes",!!t),this},this.registerEndpoint=function(t,n){return t&&(this.endpoints[t]=n||{}),this},this.$get=["$log","$apiEndpoint",function(t,r){var e=this,i=function(t){return this[t]};return n.forEach(this.endpoints,function(o,s){i[s]&&t.warn("API endpoint",s,"is being overwritten."),(o=n.extend({},e.defaults,o)).verbose&&t.info("API endpoint",s+":",o),i[s]=r(s,o)}),i}]})}(window,window.angular);var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t,n,r){"use strict";n.module("BaseModel.Service",[]).factory("$baseModel",["$window","$log","$injector",function(t,r,e){function i(t){var n=/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).*/;if(t.match(n)){var r=a(t,a.ISO_8601,!0);if(r.isValid())return r}return null}function o(t,r){if(n.isArray(t[r])){var e=t[r];return e.map(function(t,n){return o(e,n)})}return t[r]&&n.isFunction(t[r].clone)?t[r].clone():n.copy(t[r])}function s(t,n){var r=n;Object.defineProperty(this,"$parent",{enumerable:!1,get:function(){return r},set:function(t){r=t}}),this.fromJSON(t)}var a=void 0;return e.has("moment")?a=e.get("moment"):void 0!==t.moment&&(a=t.moment),s.prototype.convertToModel=function(t,i,o){var a=this;if("boolean"==typeof i&&(o=i,i=null),void 0===this[t]&&(this[t]=o?[]:null),i&&this[t]){if("string"==typeof i){if(!e.has(i))return r.warn("Unknown model",i,"specified for sub model conversion");i=e.get(i)}this[t]instanceof i||(n.isArray(this[t])?this[t]=this[t].map(function(t){return new i(t,a)}):n.isString(this[t])&&s.isId(this[t])?this[t]=new i({id:this[t]},this):this[t]=new i(this[t],this))}},s.prototype.fromJSON=function(t){var r=this;return n.isObject(t)&&n.forEach(t,function(t,n){r[n]=s.valueFromJSON(t)},this),this},s.prototype.toJSON=function(t){var r={};return t&&n.isObject(t)&&n.forEach(t,function(t,n){r[n]=s.valueToJSON(t)}),n.forEach(this,function(t,n){r.hasOwnProperty(n)||(r[n]=s.valueToJSON(t))}),r},s.prototype.extract=function(t){var r=this;if("string"==typeof t)return o(this,t);var e={};return n.isArray(t)&&t.length?n.forEach(t,function(t){e[t]=o(r,t)}):n.forEach(this,function(t,n){"$$"!==n.substr(0,2)&&(e[n]=o(r,n))}),e},s.prototype.merge=function(t){var r=this;return t&&n.isObject(t)&&n.forEach(t,function(n,e){r[e]=o(t,e)}),this},s.prototype.clear=function(){for(var t in this)this.hasOwnProperty(t)&&delete this[t];return this},s.prototype.clone=function(t,n){var r=new(0,this.constructor)(this.extract(),this.$parent);return t&&delete r.id,n&&"object"===(void 0===n?"undefined":_typeof(n))&&Object.assign(r,n),r},s.prototype.isSame=function(t){return!!t&&(n.isObject(t)?!!t.id&&(this.id&&t.id&&this.id===t.id):this.id===t)},s.prototype.copyProperty=function(t,r){this[r]&&n.isFunction(this[r].clone)?t[r]=this[r].clone():t[r]=n.copy(this[r])},s.prototype.setParent=function(t){this.$parent=t},s.valueFromJSON=function(t){if(n.isArray(t))return t.map(s.valueFromJSON);if(a&&n.isString(t))return i(t)||t;if(t&&n.isObject(t)){if(t._isAMomentObject)return t.clone();var r={};for(var e in t)t.hasOwnProperty(e)&&(r[e]=s.valueFromJSON(t[e]));return r}return t},s.valueToJSON=function(t){if(n.isArray(t))return t.map(s.valueToJSON);if(t&&n.isObject(t)){if(n.isFunction(t.toJSON))return t.toJSON();var r={};for(var e in t)t.hasOwnProperty(e)&&"$$"!==e.substr(0,2)&&(r[e]=s.valueToJSON(t[e]));return r}return t},s.onlyId=function(t){return n.isArray(t)?t.map(s.onlyId):t&&"object"===(void 0===t?"undefined":_typeof(t))&&t.id?t.id:t},s.strip=function(t){for(var r=arguments.length,e=Array(r>1?r-1:0),i=1;i<r;i++)e[i-1]=arguments[i];return n.isArray(t)?t.map(function(t){return s.strip.apply(s,[t].concat(e))}):t&&"object"===(void 0===t?"undefined":_typeof(t))?(n.forEach(t,function(n,r){e.includes(r)||delete t[r]}),t):t},s.stripIds=function(t){return n.isArray(t)?t.map(function(t){return s.stripIds(t)}):t&&"object"===(void 0===t?"undefined":_typeof(t))?(void 0!==t.id&&delete t.id,n.forEach(t,function(t){t&&"object"===(void 0===t?"undefined":_typeof(t))&&s.stripIds(t)}),t):t},s.isId=function(t){return t.match(/^[a-f\d]{24}$/i)},s}])}(window,window.angular),function(t,n,r){"use strict";n.module("Api.Endpoint.Service",["Api.Action.Service","Api.Request.Service","Url.Service"]).factory("$apiEndpoint",["$url","$apiAction","$apiRequest",function(t,r,e){function i(i,o){var s=this;o.actions=o.actions||{},o.url=t.concat(o.baseUrl,o.url||t.concat(i,":id")),this.$config=o,this.$actions={},n.forEach(o.actions,function(t,i){s.$actions[i]=r(t||{},o),s[i]=n.bind(s,e,s.$actions[i])})}return function(t,n){return new i(t,n)}}])}(window,window.angular),function(t,n,r){"use strict";n.module("Api.Request.Service",["Url.Service"]).factory("$apiRequest",["$http","$url",function(t,e){function i(t){return t&&"hasOwnProperty"!==t&&/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/.test("."+t)}function o(t,n){if(!i(n))throw new Error("Invalid dotted path:"+n);for(var e=n.split("."),o=0;o<e.length&&t!==r;o++){var s=e[o];t=null!==t?t[s]:r}return t}function s(t,r,e){var i={};return n.forEach(t||{},function(t,r){n.isFunction(t)&&(t=t()),n.isString(t)&&"@"===t.charAt(0)&&(t=o(e,t.substr(1))),i[r]=t}),n.extend(i,r||{})}function a(t){var r={};return n.forEach(t.split(/\W/),function(n){if("hasOwnProperty"===n)throw new Error("Invalid parameter name: hasOwnProperty");n&&!/^\\d+$/.test(n)&&new RegExp("(^|[^\\\\]):"+n+"(\\W|$)").test(t)&&(r[n]=!0)}),r}function u(t,n){return n&&(t=t.replace(/\/+$/,"")||"/"),t.replace(/\/\.(?=\w+($|\?))/,".").replace(/\/\\\./,"/.")}function c(t,r,i,o){return t=t.replace(/\\:/g,":"),n.forEach(i,function(i,o){var s=r.hasOwnProperty(o)?r[o]:null,a=void 0;if(n.isDefined(s)&&null!==s){var u=e.encodeUriSegment(s);a=new RegExp(":"+o+"(\\W|$)","g"),t=t.replace(a,function(t,n){return u+n})}else a=new RegExp("(/?):"+o+"(\\W|$)","g"),t=t.replace(a,function(t,n,r){return"/"===r.charAt(0)?r:n+r})}),u(t,o)}function f(t,r,e,i){var o={},u=["params","model","isArray","isModel","successInterceptor","errorInterceptor","stripTrailingSlashes"];if(n.forEach(t,function(t,r){-1===u.indexOf(r)&&(o[r]=n.copy(t))}),i&&n.isObject(i)&&n.forEach(i,function(t,r){o[r]=n.copy(t)}),t.hasBody()&&e&&n.isObject(e)&&(n.isFunction(e.toJSON)?o.data=e.toJSON():n.isArray(e)?o.data=e:o.data=n.extend({},e)),(r=n.copy(r))&&n.isObject(r))for(var f in r)r.hasOwnProperty(f)&&n.isObject(r[f])&&n.isFunction(r[f].toJSON)&&(r[f]=r[f].toJSON());r=s(t.params,r,e);var p=a(o.url);return o.url=c(t.url,r,p,t.stripTrailingSlashes),n.forEach(r,function(t,n){p[n]||(o.params=o.params||{},o.params[n]=t)}),o}return function(n,r,e,i){n.hasBody()&&r&&!e&&(e=r,r=null);var o=f(n,r,e,i);return t(o).then(function(t){return n.successInterceptor(t)}).catch(function(t){return n.errorInterceptor(t)})}}])}(window,window.angular);
//# sourceMappingURL=angular-api.min.js.map

@@ -43,4 +43,5 @@

model: '',
config: {},
stripTrailingSlashes: true,
config: {
stripTrailingSlashes: true,
},
};

@@ -116,3 +117,3 @@

this.stripTrailingSlashes = function(strip) {
this.defaults.stripTrailingSlashes = !!strip;
this.setConfig('stripTrailingSlashes', !!strip);
return this;

@@ -119,0 +120,0 @@ };

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