@im-js/core
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -1,1 +0,1 @@ | ||
var{isArray:o}=Array,{keys:l}=Object;function n(t,a){if(a.$limit){if(t==null)t={dataset:[]};else if(o(t))return console.debug("Requested Paginated Structure, But is Responded an Array."),{meta:{total:t.length,limit:a.$limit},dataset:t};!t.hasOwnProperty("dataset")&&o(t.data)&&(console.debug("Received the `data` Property of Deprecated Interface"),t.dataset=t.data,delete t.data),t.meta||(t.meta={});let{meta:e,dataset:i}=t;if(!e.hasOwnProperty("total")&&t.hasOwnProperty("total")&&(console.debug("Received the `total` Property of Deprecated Interface"),e.total=t.total,delete t.total),!e.hasOwnProperty("limit")&&a.hasOwnProperty("$limit")&&(e.limit=a.$limit),!e.hasOwnProperty("page")&&a.hasOwnProperty("$page")&&(e.limit=a.$page),!e.hasOwnProperty("searched")&&(a.hasOwnProperty("$filter")||a.hasOwnProperty("$filterBase"))&&(e.searched=!0),i.length){let d=i[0];typeof d=="object"&&l(d).length===0&&(console.debug("Received Empty Object as First Item of `dataset`"),t.dataset=[])}}return t}export{n as fixPaginatedBody}; | ||
var{isArray:o}=Array,{keys:l}=Object;function n(t,a){if(a.$limit){if(t==null)t={dataset:[]};else if(o(t))return console.debug("Requested Paginated Structure, But is Responded an Array."),{meta:{total:t.length,limit:a.$limit},dataset:t};!t.hasOwnProperty("dataset")&&o(t.data)&&(console.debug("Received the `data` Property of Deprecated Interface"),t.dataset=t.data,delete t.data),t.meta||(t.meta={});let{meta:e,dataset:i}=t;if(!e.hasOwnProperty("total")&&t.hasOwnProperty("total")&&(console.debug("Received the `total` Property of Deprecated Interface"),e.total=t.total,delete t.total),!e.hasOwnProperty("limit")&&a.hasOwnProperty("$limit")&&(e.limit=a.$limit),!e.hasOwnProperty("page")&&a.hasOwnProperty("$page")&&(e.page=a.$page),!e.hasOwnProperty("searched")&&(a.hasOwnProperty("$filter")||a.hasOwnProperty("$filterBase"))&&(e.searched=!0),i.length){let d=i[0];typeof d=="object"&&l(d).length===0&&(console.debug("Received Empty Object as First Item of `dataset`"),t.dataset=[])}}return t}export{n as fixPaginatedBody}; |
{ | ||
"name": "@im-js/core", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Present by IMR", | ||
@@ -5,0 +5,0 @@ "main": "core.esm.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2390