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

odata

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

odata - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

dist/cjs/o.js

@@ -164,3 +164,3 @@ 'use strict';

res = _a.sent();
if (!(res.status === 200)) return [3 /*break*/, 3];
if (!res.ok) return [3 /*break*/, 3];
return [4 /*yield*/, res.text()];

@@ -167,0 +167,0 @@ case 2:

@@ -160,3 +160,3 @@ /*! *****************************************************************************

res = _a.sent();
if (!(res.status === 200)) return [3 /*break*/, 3];
if (!res.ok) return [3 /*break*/, 3];
return [4 /*yield*/, res.text()];

@@ -163,0 +163,0 @@ case 2:

@@ -166,3 +166,3 @@ (function (global, factory) {

res = _a.sent();
if (!(res.status === 200)) return [3 /*break*/, 3];
if (!res.ok) return [3 /*break*/, 3];
return [4 /*yield*/, res.text()];

@@ -169,0 +169,0 @@ case 2:

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):(t=t||self,e(t.odata={}))}(this,function(t){"use strict";function e(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function h(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(s,h)}c((r=r.apply(t,e||[])).next())})}function n(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;c;)try{if(i=1,o&&(s=2&n[0]?o.return:n[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,n[1])).done)return s;switch(o=0,s&&(n=[2&n[0],s.value]),n[0]){case 0:case 1:s=n;break;case 4:return c.label++,{value:n[1],done:!1};case 5:c.label++,o=n[1],n=[0];continue;case 7:n=c.ops.pop(),c.trys.pop();continue;default:if(s=c.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){c=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){c.label=n[1];break}if(6===n[0]&&c.label<s[1]){c.label=s[1],s=n;break}if(s&&c.label<s[2]){c.label=s[2],c.ops.push(n);break}s[2]&&c.ops.pop(),c.trys.pop();continue}n=e.call(t,c)}catch(t){n=[6,t],o=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,s,h,c={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return h={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(h[Symbol.iterator]=function(){return this}),h}function r(t,e){void 0===e&&(e={});var n={batch:{boundaryPrefix:"batch_",changsetBoundaryPrefix:"changset_",endpoint:"$batch",headers:new Headers({"Content-Type":"multipart/mixed"}),useChangset:!1,useRelativeURLs:!1},credentials:"omit",fragment:"value",headers:new Headers({"Content-Type":"application/json"}),mode:"cors",redirect:"follow",referrer:"undefined"==typeof window?void 0:"client",onStart:function(){return null},onError:function(){return null},onFinish:function(){return null}},r=i(i({},n),e);if("string"==typeof t)try{var o=r.rootUrl||window.location.href;t=new URL(t,o.endsWith("/")?o:o+"/")}catch(e){t=new URL(t,r.rootUrl)}return r.rootUrl=t,new u(r)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t}).apply(this,arguments)},o=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})},s=function(){function t(t,e){this.config=e,this.url="string"==typeof t?new URL(t):t}return Object.defineProperty(t.prototype,"fetch",{get:function(){var t=new Request(this.url.href,this.config);return fetch(t,this.config)},enumerable:!1,configurable:!0}),t.prototype.applyStringQuery=function(t,e){return void 0===e&&(e={}),new URLSearchParams(t).forEach(function(n,r){t.hasOwnProperty(r)||(e[r]=n)}),this.applyQuery(e)},t.prototype.applyQuery=function(t){return void 0===t&&(t={}),this.url.searchParams.forEach(function(e,n){t.hasOwnProperty(n)||(t[n]=e)}),this.url.search=Object.entries(t).map(function(t){var e=t[0],n=t[1];return o(e)+"="+o(n)}).join("&"),this},t}(),h="\r\n",c=function(){function t(t,e,n,r){var o=this;void 0===r&&(r=!1),this.changeset=r,this.batchBody="",this.batchConfig=i(i({},e),e.batch),this.batchUid=this.getUid(),this.batchConfig.headers.set("Content-Type","multipart/mixed; boundary="+this.batchUid),this.batchConfig.batch.useChangset?t=this.checkForChangset(t,n):this.batchBody+="--"+this.batchUid,t.forEach(function(t){return"GET"===t.config.method&&t.applyQuery(n)});var s=0;this.batchBody+=t.map(function(t){return s++,["","Content-Type: application/http","Content-Transfer-Encoding: binary","Content-ID: "+s,"",t.config.method+" "+o.getRequestURL(t)+" HTTP/1.1",""+o.getHeaders(t),""+o.getBody(t)].join(h)}).join(h+"--"+this.batchUid),this.batchBody+=h+"--"+this.batchUid+"--"+h,r||this.batchConfig.headers.set("Content-Type","multipart/mixed;boundary="+this.batchUid)}return t.prototype.fetch=function(t){return e(this,void 0,void 0,function(){var e,r,o;return n(this,function(n){switch(n.label){case 0:return e=new s(t,i(i({},this.batchConfig),{body:this.batchBody,method:"POST"})),[4,e.fetch];case 1:return r=n.sent(),200!==r.status?[3,3]:[4,r.text()];case 2:return o=n.sent(),[2,this.parseResponse(o,r.headers.get("Content-Type"))];case 3:throw r}})})},t.prototype.parseResponse=function(t,e){var n=this,r=e.split("boundary="),i=r[r.length-1],o=t.split("--"+i);o.shift(),o.pop();var s=!1,h=o.map(function(t){var e=t.trim().split("\r\n\r\n");if(0===e.length)return t;if(e.length>3){var r=e.find(function(t){return t.startsWith("Content-Type: ")&&t.includes("boundary=changesetresponse_")});return r?(e.shift(),s=!0,n.parseResponse(e.join("\r\n\r\n"),r)):t}var i=e[0].split("\r\n").find(function(t){return t.startsWith("Content-ID: ")});if(i)try{var o=parseInt(i.substring(12),10)}catch(t){}var h=+e[1].split(" ")[1];if(3===e.length){var c;try{var u=JSON.parse(e[2]);c=u[n.batchConfig.fragment]||u}catch(t){c=e[2]}}return{contentId:o,status:h,body:c}});return s?h[0]:h},t.prototype.checkForChangset=function(e,n){var r=this.getChangeResources(e);return this.changeset?this.batchBody+=["","Content-Type: multipart/mixed;boundary="+this.batchUid,"","--"+this.batchUid].join(h):r.length>0?(this.batchBody="--"+this.batchUid,this.batchBody+=new t(r,this.batchConfig,n,!0).batchBody,e=this.getGETResources(e)):this.batchBody="--"+this.batchUid,e},t.prototype.getGETResources=function(t){return t.filter(function(t){return"GET"===t.config.method})},t.prototype.getChangeResources=function(t){return t.filter(function(t){return"GET"!==t.config.method})},t.prototype.getBody=function(t){return t.config.body?""+t.config.body+h+h:""},t.prototype.getUid=function(){var t=(new Date).getTime(),e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:7&n|8).toString(16)});return""+(this.changeset?this.batchConfig.batch.changsetBoundaryPrefix:this.batchConfig.batch.boundaryPrefix)+e},t.prototype.getHeaders=function(t){var e=new Headers(t.config.headers||void 0),n=Array.from(e).map(function(t){return t[0]+": "+t[1]});return n.length&&n.push(""),n.join(h)},t.prototype.getRequestURL=function(t){var e=t.url.href;return this.batchConfig.batch.useRelativeURLs&&(e=e.replace(this.batchConfig.rootUrl.href,"")),e},t}(),u=function(){function t(t){this.config=t,this.requests=[]}return t.prototype.query=function(t){return e(this,void 0,void 0,function(){var r,i,o,s=this;return n(this,function(h){switch(h.label){case 0:return h.trys.push([0,3,4,5]),this.config.onStart(this),[4,this.getFetch(t)];case 1:return r=h.sent(),[4,Promise.all(r.map(function(t){return e(s,void 0,void 0,function(){var e,r;return n(this,function(n){switch(n.label){case 0:if(!(t.status>=400))return[3,1];throw t;case 1:if(!t.ok||!t.json)return[3,6];n.label=2;case 2:return n.trys.push([2,4,,5]),this.config.onFinish(this,t),[4,t.json()];case 3:return e=n.sent(),[2,e[this.config.fragment]||e];case 4:return r=n.sent(),[2,t];case 5:return[3,8];case 6:return[4,t.text()];case 7:return[2,n.sent()];case 8:return[2]}})})}))];case 2:return i=h.sent(),[2,i.length>1?i:i[0]];case 3:throw o=h.sent(),this.config.onError(this,o),o;case 4:return this.requests=[],[7];case 5:return[2]}})})},t.prototype.fetch=function(t){return e(this,void 0,void 0,function(){var e,r;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),this.config.onStart(this),[4,this.getFetch(t)];case 1:return e=n.sent(),[2,1===e.length?e[0]:e];case 2:throw r=n.sent(),this.config.onError(this,r),r;case 3:return this.config.onFinish(this),this.requests=[],[7];case 4:return[2]}})})},t.prototype.batch=function(t){return e(this,void 0,void 0,function(){var e,r,i,o;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),e=new c(this.requests,this.config,t),r=this.getUrl(this.config.batch.endpoint),[4,e.fetch(r)];case 1:return i=n.sent(),[2,i];case 2:throw o=n.sent(),this.config.onError(this,o),o;case 3:return this.requests=[],[7];case 4:return[2]}})})},t.prototype.get=function(t){void 0===t&&(t="");var e=this.getUrl(t),n=new s(e,i(i({},this.config),{method:"GET"}));return this.requests.push(n),this},t.prototype.post=function(t,e){void 0===t&&(t="");var n=this.getUrl(t),r=new s(n,i(i({},this.config),{method:"POST",body:this.getBody(e)}));return this.requests.push(r),this},t.prototype.put=function(t,e){void 0===t&&(t="");var n=this.getUrl(t),r=new s(n,i(i({},this.config),{method:"PUT",body:this.getBody(e)}));return this.requests.push(r),this},t.prototype.patch=function(t,e){void 0===t&&(t="");var n=this.getUrl(t),r=new s(n,i(i({},this.config),{body:this.getBody(e),method:"PATCH"}));return this.requests.push(r),this},t.prototype.delete=function(t){void 0===t&&(t="");var e=this.getUrl(t),n=new s(e,i(i({},this.config),{method:"DELETE"}));return this.requests.push(n),this},t.prototype.request=function(t){return this.requests.push(t),this},Object.defineProperty(t.prototype,"pending",{get:function(){return this.requests.length},enumerable:!1,configurable:!0}),t.prototype.getUrl=function(t){return new URL(t,this.config.rootUrl)},t.prototype.getFetch=function(t){return e(this,void 0,void 0,function(){var e,r,o,s,h;return n(this,function(n){switch(n.label){case 0:if(!(this.pending>1))return[3,5];e=[],r=0,o=this.requests,n.label=1;case 1:return r<o.length?(s=o[r],"string"==typeof t?s.applyStringQuery(t,this.config.query):s.applyQuery(i(i({},this.config.query),t)),[4,s.fetch]):[3,4];case 2:h=n.sent(),e.push(h),n.label=3;case 3:return r++,[3,1];case 4:return[2,e];case 5:return"string"==typeof t?this.requests[0].applyStringQuery(t,this.config.query):this.requests[0].applyQuery(i(i({},this.config.query),t)),[4,this.requests[0].fetch];case 6:return[2,[n.sent()]]}})})},t.prototype.getBody=function(t){return t instanceof Object?JSON.stringify(t):t},t}();t.o=r,t.OBatch=c,t.OHandler=u,t.ORequest=s,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):(t=t||self,e(t.odata={}))}(this,function(t){"use strict";function e(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function h(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(s,h)}c((r=r.apply(t,e||[])).next())})}function n(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;c;)try{if(i=1,o&&(s=2&n[0]?o.return:n[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,n[1])).done)return s;switch(o=0,s&&(n=[2&n[0],s.value]),n[0]){case 0:case 1:s=n;break;case 4:return c.label++,{value:n[1],done:!1};case 5:c.label++,o=n[1],n=[0];continue;case 7:n=c.ops.pop(),c.trys.pop();continue;default:if(s=c.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){c=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){c.label=n[1];break}if(6===n[0]&&c.label<s[1]){c.label=s[1],s=n;break}if(s&&c.label<s[2]){c.label=s[2],c.ops.push(n);break}s[2]&&c.ops.pop(),c.trys.pop();continue}n=e.call(t,c)}catch(t){n=[6,t],o=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,s,h,c={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return h={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(h[Symbol.iterator]=function(){return this}),h}function r(t,e){void 0===e&&(e={});var n={batch:{boundaryPrefix:"batch_",changsetBoundaryPrefix:"changset_",endpoint:"$batch",headers:new Headers({"Content-Type":"multipart/mixed"}),useChangset:!1,useRelativeURLs:!1},credentials:"omit",fragment:"value",headers:new Headers({"Content-Type":"application/json"}),mode:"cors",redirect:"follow",referrer:"undefined"==typeof window?void 0:"client",onStart:function(){return null},onError:function(){return null},onFinish:function(){return null}},r=i(i({},n),e);if("string"==typeof t)try{var o=r.rootUrl||window.location.href;t=new URL(t,o.endsWith("/")?o:o+"/")}catch(e){t=new URL(t,r.rootUrl)}return r.rootUrl=t,new u(r)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t}).apply(this,arguments)},o=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})},s=function(){function t(t,e){this.config=e,this.url="string"==typeof t?new URL(t):t}return Object.defineProperty(t.prototype,"fetch",{get:function(){var t=new Request(this.url.href,this.config);return fetch(t,this.config)},enumerable:!1,configurable:!0}),t.prototype.applyStringQuery=function(t,e){return void 0===e&&(e={}),new URLSearchParams(t).forEach(function(n,r){t.hasOwnProperty(r)||(e[r]=n)}),this.applyQuery(e)},t.prototype.applyQuery=function(t){return void 0===t&&(t={}),this.url.searchParams.forEach(function(e,n){t.hasOwnProperty(n)||(t[n]=e)}),this.url.search=Object.entries(t).map(function(t){var e=t[0],n=t[1];return o(e)+"="+o(n)}).join("&"),this},t}(),h="\r\n",c=function(){function t(t,e,n,r){var o=this;void 0===r&&(r=!1),this.changeset=r,this.batchBody="",this.batchConfig=i(i({},e),e.batch),this.batchUid=this.getUid(),this.batchConfig.headers.set("Content-Type","multipart/mixed; boundary="+this.batchUid),this.batchConfig.batch.useChangset?t=this.checkForChangset(t,n):this.batchBody+="--"+this.batchUid,t.forEach(function(t){return"GET"===t.config.method&&t.applyQuery(n)});var s=0;this.batchBody+=t.map(function(t){return s++,["","Content-Type: application/http","Content-Transfer-Encoding: binary","Content-ID: "+s,"",t.config.method+" "+o.getRequestURL(t)+" HTTP/1.1",""+o.getHeaders(t),""+o.getBody(t)].join(h)}).join(h+"--"+this.batchUid),this.batchBody+=h+"--"+this.batchUid+"--"+h,r||this.batchConfig.headers.set("Content-Type","multipart/mixed;boundary="+this.batchUid)}return t.prototype.fetch=function(t){return e(this,void 0,void 0,function(){var e,r,o;return n(this,function(n){switch(n.label){case 0:return e=new s(t,i(i({},this.batchConfig),{body:this.batchBody,method:"POST"})),[4,e.fetch];case 1:return r=n.sent(),r.ok?[4,r.text()]:[3,3];case 2:return o=n.sent(),[2,this.parseResponse(o,r.headers.get("Content-Type"))];case 3:throw r}})})},t.prototype.parseResponse=function(t,e){var n=this,r=e.split("boundary="),i=r[r.length-1],o=t.split("--"+i);o.shift(),o.pop();var s=!1,h=o.map(function(t){var e=t.trim().split("\r\n\r\n");if(0===e.length)return t;if(e.length>3){var r=e.find(function(t){return t.startsWith("Content-Type: ")&&t.includes("boundary=changesetresponse_")});return r?(e.shift(),s=!0,n.parseResponse(e.join("\r\n\r\n"),r)):t}var i=e[0].split("\r\n").find(function(t){return t.startsWith("Content-ID: ")});if(i)try{var o=parseInt(i.substring(12),10)}catch(t){}var h=+e[1].split(" ")[1];if(3===e.length){var c;try{var u=JSON.parse(e[2]);c=u[n.batchConfig.fragment]||u}catch(t){c=e[2]}}return{contentId:o,status:h,body:c}});return s?h[0]:h},t.prototype.checkForChangset=function(e,n){var r=this.getChangeResources(e);return this.changeset?this.batchBody+=["","Content-Type: multipart/mixed;boundary="+this.batchUid,"","--"+this.batchUid].join(h):r.length>0?(this.batchBody="--"+this.batchUid,this.batchBody+=new t(r,this.batchConfig,n,!0).batchBody,e=this.getGETResources(e)):this.batchBody="--"+this.batchUid,e},t.prototype.getGETResources=function(t){return t.filter(function(t){return"GET"===t.config.method})},t.prototype.getChangeResources=function(t){return t.filter(function(t){return"GET"!==t.config.method})},t.prototype.getBody=function(t){return t.config.body?""+t.config.body+h+h:""},t.prototype.getUid=function(){var t=(new Date).getTime(),e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:7&n|8).toString(16)});return""+(this.changeset?this.batchConfig.batch.changsetBoundaryPrefix:this.batchConfig.batch.boundaryPrefix)+e},t.prototype.getHeaders=function(t){var e=new Headers(t.config.headers||void 0),n=Array.from(e).map(function(t){return t[0]+": "+t[1]});return n.length&&n.push(""),n.join(h)},t.prototype.getRequestURL=function(t){var e=t.url.href;return this.batchConfig.batch.useRelativeURLs&&(e=e.replace(this.batchConfig.rootUrl.href,"")),e},t}(),u=function(){function t(t){this.config=t,this.requests=[]}return t.prototype.query=function(t){return e(this,void 0,void 0,function(){var r,i,o,s=this;return n(this,function(h){switch(h.label){case 0:return h.trys.push([0,3,4,5]),this.config.onStart(this),[4,this.getFetch(t)];case 1:return r=h.sent(),[4,Promise.all(r.map(function(t){return e(s,void 0,void 0,function(){var e,r;return n(this,function(n){switch(n.label){case 0:if(!(t.status>=400))return[3,1];throw t;case 1:if(!t.ok||!t.json)return[3,6];n.label=2;case 2:return n.trys.push([2,4,,5]),this.config.onFinish(this,t),[4,t.json()];case 3:return e=n.sent(),[2,e[this.config.fragment]||e];case 4:return r=n.sent(),[2,t];case 5:return[3,8];case 6:return[4,t.text()];case 7:return[2,n.sent()];case 8:return[2]}})})}))];case 2:return i=h.sent(),[2,i.length>1?i:i[0]];case 3:throw o=h.sent(),this.config.onError(this,o),o;case 4:return this.requests=[],[7];case 5:return[2]}})})},t.prototype.fetch=function(t){return e(this,void 0,void 0,function(){var e,r;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),this.config.onStart(this),[4,this.getFetch(t)];case 1:return e=n.sent(),[2,1===e.length?e[0]:e];case 2:throw r=n.sent(),this.config.onError(this,r),r;case 3:return this.config.onFinish(this),this.requests=[],[7];case 4:return[2]}})})},t.prototype.batch=function(t){return e(this,void 0,void 0,function(){var e,r,i,o;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),e=new c(this.requests,this.config,t),r=this.getUrl(this.config.batch.endpoint),[4,e.fetch(r)];case 1:return i=n.sent(),[2,i];case 2:throw o=n.sent(),this.config.onError(this,o),o;case 3:return this.requests=[],[7];case 4:return[2]}})})},t.prototype.get=function(t){void 0===t&&(t="");var e=this.getUrl(t),n=new s(e,i(i({},this.config),{method:"GET"}));return this.requests.push(n),this},t.prototype.post=function(t,e){void 0===t&&(t="");var n=this.getUrl(t),r=new s(n,i(i({},this.config),{method:"POST",body:this.getBody(e)}));return this.requests.push(r),this},t.prototype.put=function(t,e){void 0===t&&(t="");var n=this.getUrl(t),r=new s(n,i(i({},this.config),{method:"PUT",body:this.getBody(e)}));return this.requests.push(r),this},t.prototype.patch=function(t,e){void 0===t&&(t="");var n=this.getUrl(t),r=new s(n,i(i({},this.config),{body:this.getBody(e),method:"PATCH"}));return this.requests.push(r),this},t.prototype.delete=function(t){void 0===t&&(t="");var e=this.getUrl(t),n=new s(e,i(i({},this.config),{method:"DELETE"}));return this.requests.push(n),this},t.prototype.request=function(t){return this.requests.push(t),this},Object.defineProperty(t.prototype,"pending",{get:function(){return this.requests.length},enumerable:!1,configurable:!0}),t.prototype.getUrl=function(t){return new URL(t,this.config.rootUrl)},t.prototype.getFetch=function(t){return e(this,void 0,void 0,function(){var e,r,o,s,h;return n(this,function(n){switch(n.label){case 0:if(!(this.pending>1))return[3,5];e=[],r=0,o=this.requests,n.label=1;case 1:return r<o.length?(s=o[r],"string"==typeof t?s.applyStringQuery(t,this.config.query):s.applyQuery(i(i({},this.config.query),t)),[4,s.fetch]):[3,4];case 2:h=n.sent(),e.push(h),n.label=3;case 3:return r++,[3,1];case 4:return[2,e];case 5:return"string"==typeof t?this.requests[0].applyStringQuery(t,this.config.query):this.requests[0].applyQuery(i(i({},this.config.query),t)),[4,this.requests[0].fetch];case 6:return[2,[n.sent()]]}})})},t.prototype.getBody=function(t){return t instanceof Object?JSON.stringify(t):t},t}();t.o=r,t.OBatch=c,t.OHandler=u,t.ORequest=s,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=o.min.js.map
{
"name": "odata",
"description": "o.js is a isomorphic Odata Javascript library to simplify the request of data. The main goal is to build a standalone, lightweight and easy to understand Odata lib.",
"version": "2.0.0",
"version": "2.0.1",
"main": "dist/cjs/o.js",

@@ -6,0 +6,0 @@ "browser": "dist/umd/o.js",

@@ -66,3 +66,3 @@ import { OdataConfig } from "./OdataConfig";

const res: Response = await req.fetch;
if (res.status === 200) {
if (res.ok) {
const data = await res.text();

@@ -69,0 +69,0 @@ return this.parseResponse(data, res.headers.get("Content-Type"));

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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