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

paliari-js-utils

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paliari-js-utils - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

dist/paliari-js-utils.js

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

module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=3)}([function(t,e,n){"use strict";n.r(e);n(2),n(1);var r=function(t,e){return String(e).split(".").forEach(function(e){if(!t)return t;t=t[e]}),t};function o(t){return(o="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})(t)}var i=function(t){return null!==t&&"object"===o(t)},u=function(t){return Object.prototype.toString.call(t).slice(8,-1)},c=function(t){return"[object Object]"===Object.prototype.toString.call(arg)},a={"à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ő":"o","ù":"u","ú":"u","û":"u","ü":"u","ű":"u","ý":"y","ÿ":"y"},f=function(t){return t?t.toLocaleLowerCase().replace(/[^a-z0-9\s_-]/g,function(t){return a[t]||t}):t},l=function(t){return"[object Date]"===Object.prototype.toString.call(t)},s=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},d=function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},p=function(t){return i(t)?function t(e){if(l(e))return new Date(e);if(s(e))return e;var n=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(r){n[r]=i(e[r])?t(e[r]):e[r]}),n}(t):t};function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y=function t(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(!r.length)return e;var u=r.shift();return i(e)&&i(u)&&Object.keys(u).forEach(function(n){i(u[n])?(e[n]||Object.assign(e,h({},n,{})),t(e[n],u[n])):Object.assign(e,h({},n,u[n]))}),t.apply(void 0,[e].concat(r))},g=function(t){return function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return Object.getOwnPropertyNames(e).reduce(function(r,u){return o.push(u),i(e[u])?t(e[u],n,r,o):r[o.join(n)]=e[u],o.pop(),r},r)}(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/")},b="aiCOVlB8Ws3ZSMyJ64dwtqAI5TDG1ejgcFH2YfXErxbRKhzo90pvUPNnL7umkQ",v={};b.split("").sort().forEach(function(t,e){v[b.charAt(e)]=t});var m=function(t){if(!t)return t;var e="";return t.split("").forEach(function(t){e+=v[t]||t}),e},w=[100,200,500,750],j=function(t){return w.find(function(e){if(t<=e)return e})},O=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=0,r=0;Object.keys(t).forEach(function(e){r+=Number(e)*t[e],n+=t[e]});var o=Math.pow(10,e);return n?Math.round(r/n*o)/o:0},_=function(t){return t.replace(/-/g,"_").replace(/\//g,".").toLocaleLowerCase()},S=function(t,e,n){if(!e||!n)throw{message:"Locale not found!",code:"locale_not_found"};return"".concat(f(t),"_").concat(f(e),"_").concat(f(n)).replace(/ /g,"_")},E=function(t,e){return t.find(function(t){return t.types.includes(e)})||{}},k=function(t){return S(E(t,"country").short_name,E(t,"administrative_area_level_1").short_name,E(t,"administrative_area_level_2").long_name)},A=function(t){if(!t.address_components)throw{code:"convert_place_no_address_componentes"};var e={};return e.geometry={viewport:{northeast:{lat:t.geometry.viewport.f.f,lng:t.geometry.viewport.b.f},southwest:{lat:t.geometry.viewport.f.b,lng:t.geometry.viewport.b.b}},location:{lat:t.geometry.location.lat(),lng:t.geometry.location.lng()}},e.formatted_address=t.formatted_address,e.place_id=t.place_id,e.cidade_id=k(t.address_components),e},L=function(){return function(t){return"desc"===t?9999999999999-Date.now():Date.now()}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"desc").toString()+Math.random().toString().substr(2,7)},x="zyxwvutsrqponmlkjihgfedcba_ZYXWVUTSRQPONMLKJIHGFEDCBA9876543210-",P=0,M=[],C=function(){var t=Date.now(),e=t===P;P=t;for(var n=new Array(8),r=7;r>=0;r--)n[r]=x.charAt(t%64),t=Math.floor(t/64);if(0!==t)throw new Error("We should have converted the entire timestamp.");var o=n.join("");if(e){for(r=11;r>=0&&63===M[r];r--)M[r]=0;M[r]++}else for(r=0;r<12;r++)M[r]=Math.floor(64*Math.random());for(r=0;r<12;r++)o+=x.charAt(M[r]);if(20!=o.length)throw new Error("Length should be 20.");return o},D=function(t){for(var e=0,n=0;n<8;n++){var r=x.indexOf(t.charAt(n));if(-1===r)throw new Error("Invalid id!");e=64*e+r}return e},I=function t(e,n){var r=e.split(""),o=r.pop(),i=n[n.indexOf(o)+1];return i?r.join("")+i:t(r.join(""),n)+n[0]},T=function(t){return I(t,x.split(""))},R=function(t){return I(t,x.split("").sort())};var N=function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object.keys(e).forEach(function(t){"function"==typeof e[t]?n[t]=null===r[t]?null:e[t](r[t]):n[t]=r[t]||e[t]})};function G(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var K="pt_br",z=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.locales=e,this.locale=n}return function(t,e,n){e&&G(t.prototype,e),n&&G(t,n)}(t,[{key:"t",value:function(t,e){return function(t,e){return t&&e?(Object.keys(e).forEach(function(n){t=t.replace(new RegExp("%{"+n+"}","g"),e[n])}),t):t}(r(this.current,t),e)}},{key:"setLocale",value:function(t){if(this.getAvailableLocales().includes(t))return this.locale=t,this;throw new Error("Locale not found!")}},{key:"getLocale",value:function(){return this.locale}},{key:"getAvailableLocales",value:function(){return Object.keys(this.locales)}},{key:"current",get:function(){return this.locales[this.locale]}}]),t}();function B(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){H(t,e,n[e])})}return t}function H(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function U(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var W="current_locale",q=function(t){var e=localStorage.getItem(W)||window.navigator.language.toLowerCase().replace("-","_");return t.getAvailableLocales().includes(e)?e:(e=e.substr(0,2),t.getAvailableLocales().includes(e)?e:K)},F=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.i18n=e,this.fecha=n,this.current=q(e)}return function(t,e,n){e&&U(t.prototype,e),n&&U(t,n)}(t,[{key:"reset",value:function(t){t!==this.current&&(this.current=t)}},{key:"current",set:function(t){localStorage.setItem(W,t),this.i18n.setLocale(t),this.fecha&&(this.fecha.i18n=B({},this.fecha.i18n,this.i18n.t("date_time.names")),this.fecha.masks=B({},this.fecha.masks,this.i18n.t("date_time.formats")))},get:function(){return localStorage.getItem(W)}}]),t}();n.d(e,"deepKey",function(){return r}),n.d(e,"isObject",function(){return i}),n.d(e,"getClassName",function(){return u}),n.d(e,"isHash",function(){return c}),n.d(e,"transliterate",function(){return f}),n.d(e,"isDate",function(){return l}),n.d(e,"isRegExp",function(){return s}),n.d(e,"ucfirst",function(){return d}),n.d(e,"deepClone",function(){return p}),n.d(e,"deepMerge",function(){return y}),n.d(e,"flattenObject",function(){return g}),n.d(e,"jsEncode",function(){return m}),n.d(e,"thumbRange",function(){return j}),n.d(e,"starRating",function(){return O}),n.d(e,"prepareKey",function(){return _}),n.d(e,"convertPlace",function(){return A}),n.d(e,"idCidade",function(){return S}),n.d(e,"idCidadeAddressComponent",function(){return k}),n.d(e,"idGeneratorDesc",function(){return C}),n.d(e,"idGeneratorNumeric",function(){return L}),n.d(e,"idDescTimestamp",function(){return D}),n.d(e,"prevId",function(){return T}),n.d(e,"nextId",function(){return R}),n.d(e,"BaseModel",function(){return N}),n.d(e,"I18n",function(){return z}),n.d(e,"Language",function(){return F})},function(t,e){String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)})},function(t,e){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return!1;for(var o=0|e,i=Math.max(o>=0?o:r-Math.abs(o),0);i<r;){if(n[i]===t)return!0;i++}return!1}})},function(t,e,n){t.exports=n(0)}]);
module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=3)}([function(t,e,n){"use strict";n.r(e);n(2),n(1);var r=function(t,e){return String(e).split(".").forEach(function(e){if(!t)return t;t=t[e]}),t};function o(t){return(o="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})(t)}var i=function(t){return null!==t&&"object"===o(t)},u=function(t){return Object.prototype.toString.call(t).slice(8,-1)},c=function(t){return"[object Object]"===Object.prototype.toString.call(t)},a={"à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ő":"o","ù":"u","ú":"u","û":"u","ü":"u","ű":"u","ý":"y","ÿ":"y"},f=function(t){return t?t.toLocaleLowerCase().replace(/[^a-z0-9\s_-]/g,function(t){return a[t]||t}):t},l=function(t){return"[object Date]"===Object.prototype.toString.call(t)},s=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},d=function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},p=function(t){return i(t)?function t(e){if(l(e))return new Date(e);if(s(e))return e;var n=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(r){n[r]=i(e[r])?t(e[r]):e[r]}),n}(t):t};function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y=function t(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(!r.length)return e;var u=r.shift();return i(e)&&i(u)&&Object.keys(u).forEach(function(n){i(u[n])?(e[n]||Object.assign(e,h({},n,{})),t(e[n],u[n])):Object.assign(e,h({},n,u[n]))}),t.apply(void 0,[e].concat(r))},b=function(t){return function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return Object.getOwnPropertyNames(e).reduce(function(r,u){return o.push(u),i(e[u])?t(e[u],n,r,o):r[o.join(n)]=e[u],o.pop(),r},r)}(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/")},g="aiCOVlB8Ws3ZSMyJ64dwtqAI5TDG1ejgcFH2YfXErxbRKhzo90pvUPNnL7umkQ",v={};g.split("").sort().forEach(function(t,e){v[g.charAt(e)]=t});var m=function(t){if(!t)return t;var e="";return t.split("").forEach(function(t){e+=v[t]||t}),e},w=[100,200,500,750],j=function(t){return w.find(function(e){if(t<=e)return e})},O=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=0,r=0;Object.keys(t).forEach(function(e){r+=Number(e)*t[e],n+=t[e]});var o=Math.pow(10,e);return n?Math.round(r/n*o)/o:0},_=function(t){return t.replace(/-/g,"_").replace(/\//g,".").toLocaleLowerCase()},S=function(t,e){return function t(e,n){return c(n)&&c(e)?Object.keys(n).reduce(function(r,o){return void 0!==e[o]&&(r[o]=c(n[o])?t(e[o],n[o]):e[o]),r},{}):e}(t,e)},k=function(t,e,n){if(!e||!n)throw{message:"Locale not found!",code:"locale_not_found"};return"".concat(f(t),"_").concat(f(e),"_").concat(f(n)).replace(/ /g,"_")},E=function(t,e){return t.find(function(t){return t.types.includes(e)})||{}},A=function(t){return k(E(t,"country").short_name,E(t,"administrative_area_level_1").short_name,E(t,"administrative_area_level_2").long_name)},L=function(t){if(!t.address_components)throw{code:"convert_place_no_address_componentes"};var e={};return e.geometry={viewport:{northeast:{lat:t.geometry.viewport.f.f,lng:t.geometry.viewport.b.f},southwest:{lat:t.geometry.viewport.f.b,lng:t.geometry.viewport.b.b}},location:{lat:t.geometry.location.lat(),lng:t.geometry.location.lng()}},e.formatted_address=t.formatted_address,e.place_id=t.place_id,e.cidade_id=A(t.address_components),e},P=function(){return function(t){return"desc"===t?9999999999999-Date.now():Date.now()}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"desc").toString()+Math.random().toString().substr(2,7)},x="zyxwvutsrqponmlkjihgfedcba_ZYXWVUTSRQPONMLKJIHGFEDCBA9876543210-",M=0,C=[],D=function(){var t=Date.now(),e=t===M;M=t;for(var n=new Array(8),r=7;r>=0;r--)n[r]=x.charAt(t%64),t=Math.floor(t/64);if(0!==t)throw new Error("We should have converted the entire timestamp.");var o=n.join("");if(e){for(r=11;r>=0&&63===C[r];r--)C[r]=0;C[r]++}else for(r=0;r<12;r++)C[r]=Math.floor(64*Math.random());for(r=0;r<12;r++)o+=x.charAt(C[r]);if(20!=o.length)throw new Error("Length should be 20.");return o},I=function(t){for(var e=0,n=0;n<8;n++){var r=x.indexOf(t.charAt(n));if(-1===r)throw new Error("Invalid id!");e=64*e+r}return e},T=function t(e,n){var r=e.split(""),o=r.pop(),i=n[n.indexOf(o)+1];return i?r.join("")+i:t(r.join(""),n)+n[0]},R=function(t){return T(t,x.split(""))},N=function(t){return T(t,x.split("").sort())};function z(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var G=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object.keys(e).forEach(function(t){"function"==typeof e[t]?n[t]=null===r[t]?null:e[t](r[t]):n[t]=r[t]||e[t]})}return function(t,e,n){e&&z(t.prototype,e),n&&z(t,n)}(t,[{key:"sanitize",value:function(t){return S(this,t)}}]),t}();function K(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var B="pt_br",H=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:B;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.locales=e,this.locale=n}return function(t,e,n){e&&K(t.prototype,e),n&&K(t,n)}(t,[{key:"t",value:function(t,e){return function(t,e){return t&&e?(Object.keys(e).forEach(function(n){t=t.replace(new RegExp("%{"+n+"}","g"),e[n])}),t):t}(r(this.current,t),e)}},{key:"setLocale",value:function(t){if(this.getAvailableLocales().includes(t))return this.locale=t,this;throw new Error("Locale not found!")}},{key:"getLocale",value:function(){return this.locale}},{key:"getAvailableLocales",value:function(){return Object.keys(this.locales)}},{key:"current",get:function(){return this.locales[this.locale]}}]),t}();function U(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){W(t,e,n[e])})}return t}function W(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function q(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var F="current_locale",J=function(t){var e=localStorage.getItem(F)||window.navigator.language.toLowerCase().replace("-","_");return t.getAvailableLocales().includes(e)?e:(e=e.substr(0,2),t.getAvailableLocales().includes(e)?e:B)},Q=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.i18n=e,this.fecha=n,this.current=J(e)}return function(t,e,n){e&&q(t.prototype,e),n&&q(t,n)}(t,[{key:"reset",value:function(t){t!==this.current&&(this.current=t)}},{key:"current",set:function(t){localStorage.setItem(F,t),this.i18n.setLocale(t),this.fecha&&(this.fecha.i18n=U({},this.fecha.i18n,this.i18n.t("date_time.names")),this.fecha.masks=U({},this.fecha.masks,this.i18n.t("date_time.formats")))},get:function(){return localStorage.getItem(F)}}]),t}();n.d(e,"deepKey",function(){return r}),n.d(e,"isObject",function(){return i}),n.d(e,"getClassName",function(){return u}),n.d(e,"isHash",function(){return c}),n.d(e,"transliterate",function(){return f}),n.d(e,"isDate",function(){return l}),n.d(e,"isRegExp",function(){return s}),n.d(e,"ucfirst",function(){return d}),n.d(e,"deepClone",function(){return p}),n.d(e,"deepMerge",function(){return y}),n.d(e,"flattenObject",function(){return b}),n.d(e,"jsEncode",function(){return m}),n.d(e,"thumbRange",function(){return j}),n.d(e,"starRating",function(){return O}),n.d(e,"prepareKey",function(){return _}),n.d(e,"convertPlace",function(){return L}),n.d(e,"idCidade",function(){return k}),n.d(e,"idCidadeAddressComponent",function(){return A}),n.d(e,"idGeneratorDesc",function(){return D}),n.d(e,"idGeneratorNumeric",function(){return P}),n.d(e,"idDescTimestamp",function(){return I}),n.d(e,"prevId",function(){return R}),n.d(e,"nextId",function(){return N}),n.d(e,"BaseModel",function(){return G}),n.d(e,"I18n",function(){return H}),n.d(e,"Language",function(){return Q}),n.d(e,"sanitize",function(){return S})},function(t,e){String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)})},function(t,e){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return!1;for(var o=0|e,i=Math.max(o>=0?o:r-Math.abs(o),0);i<r;){if(n[i]===t)return!0;i++}return!1}})},function(t,e,n){t.exports=n(0)}]);
{
"name": "paliari-js-utils",
"version": "0.2.0",
"version": "0.2.1",
"description": "Biblioteca de utilidades para JS",

@@ -5,0 +5,0 @@ "main": "dist/paliari-js-utils.js",

@@ -328,2 +328,21 @@ # paliari-js-utils

### sanitize
```js
import { sanitize } from 'paliari-js-utils'
var obj = {
a: { a1: 'a1', a2: 'a2' },
b: { b1: 'b1', b2: 'b2' },
c: 1,
d: 1
}
var rules = {
a: { a2: true},
b: true,
c: true }
}
sanitize(obj, rules) // {a: {a2: 'a2'}, b: {b1: 'b1', b2: 'b2'}, c: 1}
```
### jsEncode

@@ -330,0 +349,0 @@

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