Socket
Socket
Sign inDemoInstall

chober

Package Overview
Dependencies
0
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.2 to 1.2.3

2

dist/chober.js

@@ -1633,3 +1633,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

module.exports = {"name":"chober","version":"1.2.2","description":"Chober.js - is a collection of methods that are used by programmers every day. We decided to put all the methods together so as not to copy them from project to project.","main":"dist/chober.js","scripts":{"prod":"webpack --env production --config webpack.config.js","dev":"webpack --env development --config webpack.config.js","watch":"webpack --env development --config webpack.config.js --watch","build":"npm run docs && npm run prod && npm run dev","docs":"jsdoc2md --template README.hbs --files lib/*.js > docs/README.md","docs-server":"docsify serve docs -p 35730"},"repository":{"type":"git","url":"git+https://github.com/BrooonS/chober.js.git"},"keywords":["webpack","js","javascript","library","es6","commonjs","methods","chober","isEmpty","isArray","isNumber","isString","isObject","isBoolean","isEqual","isUndefined","getQuery","getNumbers","getScrollbarWidth","getCookie","getOffset","getType","setQuery","setCookie","removeCookie","decodeHtml","clone","invertObject","first","flatten","formatNumber","debounce","scrollTo","uniq"],"author":"Valery Strelets","license":"MIT","bugs":{"url":"https://github.com/BrooonS/chober.js/issues"},"homepage":"https://github.com/BrooonS/chober.js#readme","devDependencies":{"@babel/core":"^7.1.2","@babel/plugin-proposal-object-rest-spread":"^7.0.0","@babel/plugin-transform-object-assign":"^7.0.0","@babel/plugin-transform-runtime":"^7.1.0","@babel/preset-env":"^7.1.0","@babel/runtime":"^7.1.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.4","docsify-cli":"^4.2.1","eslint":"^5.6.1","eslint-config-airbnb":"^17.1.0","eslint-loader":"^2.1.1","eslint-plugin-import":"^2.14.0","eslint-plugin-jsx-a11y":"^6.1.2","eslint-plugin-react":"^7.11.1","jsdoc-to-markdown":"^4.0.1","uglifyjs-webpack-plugin":"^2.0.1","webpack":"^4.23.1","webpack-cli":"^3.1.2"}};
module.exports = {"name":"chober","version":"1.2.3","description":"Chober.js - is a collection of methods that are used by programmers every day. We decided to put all the methods together so as not to copy them from project to project.","main":"dist/chober.js","scripts":{"prod":"webpack --env production --config webpack.config.js","dev":"webpack --env development --config webpack.config.js","watch":"webpack --env development --config webpack.config.js --watch","build":"npm run docs && npm run prod && npm run dev","docs":"jsdoc2md --template README.hbs --files lib/*.js > docs/README.md","docs-server":"docsify serve docs -p 35730"},"repository":{"type":"git","url":"git+https://github.com/BrooonS/chober.js.git"},"keywords":["webpack","js","javascript","library","es6","commonjs","methods","chober","isEmpty","isArray","isNumber","isString","isObject","isBoolean","isEqual","isUndefined","getQuery","getNumbers","getScrollbarWidth","getCookie","getOffset","getType","setQuery","setCookie","removeCookie","decodeHtml","clone","invertObject","first","flatten","formatNumber","debounce","scrollTo","uniq"],"author":"Valery Strelets","license":"MIT","bugs":{"url":"https://github.com/BrooonS/chober.js/issues"},"homepage":"https://github.com/BrooonS/chober.js#readme","devDependencies":{"@babel/core":"^7.1.6","@babel/plugin-proposal-object-rest-spread":"^7.0.0","@babel/plugin-transform-object-assign":"^7.0.0","@babel/plugin-transform-runtime":"^7.1.0","@babel/preset-env":"^7.1.6","@babel/runtime":"^7.1.5","babel-eslint":"^10.0.1","babel-loader":"^8.0.4","docsify-cli":"^4.3.0","eslint":"^5.9.0","eslint-config-airbnb":"^17.1.0","eslint-loader":"^2.1.1","eslint-plugin-import":"^2.14.0","eslint-plugin-jsx-a11y":"^6.1.2","eslint-plugin-react":"^7.11.1","jsdoc-to-markdown":"^4.0.1","uglifyjs-webpack-plugin":"^2.0.1","webpack":"^4.26.0","webpack-cli":"^3.1.2"}};

@@ -1636,0 +1636,0 @@ /***/ })

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

!function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("_c",[],t):"object"==typeof exports?exports._c=t():e._c=t()}("undefined"==typeof self?this:self,function(){return function(n){var r={};function __webpack_require__(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,__webpack_require__),t.l=!0,t.exports}return __webpack_require__.m=n,__webpack_require__.c=r,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)__webpack_require__.d(n,r,function(e){return t[e]}.bind(null,r));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=9)}([function(e,t){e.exports=function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){var o=n(0);e.exports=function _objectSpread(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(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(e){o(t,e,n[e])})}return t}},function(e,t){function _extends(){return e.exports=_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(this,arguments)}e.exports=_extends},function(e,t,n){var r=n(6),o=n(7),i=n(8);e.exports=function _toConsumableArray(e){return r(e)||o(e)||i()}},function(e,t){e.exports=function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e){e.exports={a:"1.2.2"}},function(e,t){e.exports=function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){"use strict";n.r(t);var r=n(2),o=n.n(r),i=n(4),c=n.n(i),u=n(5);var _=function isEmpty(e){return!(e&&(e.length||Object.keys(e).length))};var a=function getType(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase()};var v=function isArray(e){return"array"===a(e)};var f=function isNumber(e){return"number"===a(e)};var s=function isString(e){return"string"===a(e)};var l=function isObject(e){return"object"===a(e)};var d=function isBoolean(e){return"boolean"===a(e)},p=n(0),y=n.n(p),b=n(1),h=n.n(b),m=n(3),g=n.n(m);var w=function isUndefined(e){return"undefined"===a(e)},O="[Circular]";var j=function clone(t){if(w(t))throw new Error("[chober]: nothing to clone.");try{return JSON.parse(JSON.stringify(t))}catch(e){if(l(t)){var n=function objectClone(e){var t=Object.keys(e).reduce(function(t,n){try{return JSON.stringify(e[n]),t}catch(e){return g()(t).concat([n])}},[]).reduce(function(e,t){return h()({},e,y()({},t,O))},e);return JSON.parse(JSON.stringify(t))}(t);if(!_(n))return n}if(v(t)){var r=function arrayClone(e){var t=e.reduce(function(t,e,n){try{return JSON.stringify(e),t}catch(e){return g()(t).concat([n])}},[]).reduce(function(e,t){return e[t]=O,e},e);return JSON.parse(JSON.stringify(t))}(t);if(!_(r))return r}throw new Error(e)}};var S=function isEqual(e,t){return JSON.stringify(j(e))===JSON.stringify(j(t))};var k=function getQuery(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=window.location.search.substr(1),r={};return t?(e.length&&o()(r,e.reduce(function(e,t){return h()({},e,y()({},t,[]))},{})),t.split("&").forEach(function(e){if(e){var n=e.split("=");Object.prototype.hasOwnProperty.call(r,n[0])&&(v(r[n[0]])?r[n[0]].push(n[1]):r[n[0]]=[r[n[0]],n[1]]),v(r[n[0]])?r[n[0]].forEach(function(e,t){r[n[0]][t]=decodeURIComponent(e)}):r[n[0]]=decodeURIComponent(n[1])}}),r):{}};var C=function getNumbers(e){return w(e)||!s(e)?"":String(e).replace(/\D+/g,"")};var x=function getScrollbarWidth(){return window.innerWidth-document.documentElement.clientWidth};var E=function getCookie(e){if(w(e))throw new Error("[chober]: key is not passed.");if(!s(e))throw new Error("[chober]: key must to be a string.");var t="; ".concat(document.cookie).split("; ".concat(e,"="));return 2===t.length?t.pop().split(";").shift():""};var q=function getOffset(e){if(w(e))throw new Error("[chober]: selector is not passed.");var t=document.querySelector(e).getBoundingClientRect(),n=window.pageXOffset,r=window.pageYOffset;return{x:t.left+n,y:t.top+r,left:t.left+n,top:t.top+r,right:t.right+n,bottom:t.bottom+r}};var N=function uniq(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];if(!v(e))throw new Error("[chober]: param must to be an array.");return j(e).map(function(e){return JSON.stringify(e)}).filter(function(e,t,n){return n.indexOf(e)===t}).map(function(e){return JSON.parse(e)})};var T=function flattenDeep(e){return v(e)?e.reduce(function(e,t){return v(t)?e.concat(flattenDeep(t)):e.concat(t)},[]):[]};var I=function setQuery(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=t.isSaveOld,r=void 0!==n&&n,o=t.isSaveHash,i=void 0===o||o,c=t.isSaveEmptyFields,u=void 0!==c&&c,f=Object.prototype.hasOwnProperty,a=e?Object.entries(e).reduce(function(e,t){var n=t[0],r=v(t[1])?N(T(t[1]).map(function(e){return String(e)})):t[1];return h()({},e,y()({},n,r))},{}):{},s=r&&k(),l=r&&Object.entries(a).concat(Object.entries(s)),d=i&&window.location.href.split("#")[1],p=r&&!_(s)?l.reduce(function(e,t){var n=t[0],r=t[1],o=f.call(e,n),i=f.call(s,n);if(!o||i)return o&&i?e:h()({},e,y()({},n,r));var c=e[n]===r?r:[e[n],r],u=v(e[n])?N(e[n].concat(r)):c,a=v(r)?N(r.concat(e[n])):u;return h()({},e,y()({},n,a))},{}):a,b=Object.keys(p).map(function(t){if("&"===t)return"";var e,n=p[t];return e=u?t?"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(n)):"":t&&n?"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(n)):"",v(n)?n.map(function(e){return u?t?"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e)):"":t&&e?"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e)):""}).filter(function(e){return e}).join("&"):e}).filter(function(e){return e}).join("&");window.history.pushState({},document.title,b?"?".concat(decodeURIComponent(b)).concat(d?"#".concat(d):""):window.location.href.split("?")[0].split("#")[0]+(d?"#".concat(d):""))};var U=function setCookie(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];if(w(e)||w(t))throw new Error("[chober]: key or value is not passed.");var r=n&&(new Date).getTime()+n,o=n&&new Date(r).toUTCString(),i="".concat(e,"=").concat(t,"; path=/"),c="; expires=".concat(o);document.cookie=n?i:i+c};var R=function removeCookie(e){if(w(e))throw new Error("[chober]: key is not passed.");document.cookie="".concat(e,"=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;")};var J=function decodeHtml(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value};var P=function invertObject(e){if(w(e))throw new Error("[chober]: object is not passed.");return e&&Object.entries(e).reduce(function(e,t){return h()({},e,y()({},t[1],t[0]))},{})};var A=function first(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;return v(e)?e.slice(0,t):[]};var D=function formatNumber(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:" ";return String(e||0).replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g,"$1".concat(t))};var M=function debounce(r,o){var i=this;if(!r&&!o)throw new Error("[chober]: function or delay is not passed.");var c=null;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];c&&clearTimeout(c),c=setTimeout(function onComplete(){r.apply(i,t),c=null},o)}};var H=function scrollTo(e){if(w(e))throw new Error("[chober]: element is not passed.");e.scrollIntoView({behavior:"smooth"})};n.d(t,"VERSION",function(){return Q}),n.d(t,"isEmpty",function(){return _}),n.d(t,"isArray",function(){return v}),n.d(t,"isNumber",function(){return f}),n.d(t,"isString",function(){return s}),n.d(t,"isObject",function(){return l}),n.d(t,"isBoolean",function(){return d}),n.d(t,"isEqual",function(){return S}),n.d(t,"isUndefined",function(){return w}),n.d(t,"getQuery",function(){return k}),n.d(t,"getNumbers",function(){return C}),n.d(t,"getScrollbarWidth",function(){return x}),n.d(t,"getCookie",function(){return E}),n.d(t,"getOffset",function(){return q}),n.d(t,"getType",function(){return a}),n.d(t,"setQuery",function(){return I}),n.d(t,"setCookie",function(){return U}),n.d(t,"removeCookie",function(){return R}),n.d(t,"decodeHtml",function(){return J}),n.d(t,"clone",function(){return j}),n.d(t,"invertObject",function(){return P}),n.d(t,"first",function(){return A}),n.d(t,"flattenDeep",function(){return T}),n.d(t,"formatNumber",function(){return D}),n.d(t,"debounce",function(){return M}),n.d(t,"scrollTo",function(){return H}),n.d(t,"uniq",function(){return N});
!function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("_c",[],t):"object"==typeof exports?exports._c=t():e._c=t()}("undefined"==typeof self?this:self,function(){return function(n){var r={};function __webpack_require__(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,__webpack_require__),t.l=!0,t.exports}return __webpack_require__.m=n,__webpack_require__.c=r,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)__webpack_require__.d(n,r,function(e){return t[e]}.bind(null,r));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=9)}([function(e,t){e.exports=function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){var o=n(0);e.exports=function _objectSpread(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(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(e){o(t,e,n[e])})}return t}},function(e,t){function _extends(){return e.exports=_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(this,arguments)}e.exports=_extends},function(e,t,n){var r=n(6),o=n(7),i=n(8);e.exports=function _toConsumableArray(e){return r(e)||o(e)||i()}},function(e,t){e.exports=function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e){e.exports={a:"1.2.3"}},function(e,t){e.exports=function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){"use strict";n.r(t);var r=n(2),o=n.n(r),i=n(4),c=n.n(i),u=n(5);var _=function isEmpty(e){return!(e&&(e.length||Object.keys(e).length))};var a=function getType(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase()};var v=function isArray(e){return"array"===a(e)};var f=function isNumber(e){return"number"===a(e)};var s=function isString(e){return"string"===a(e)};var l=function isObject(e){return"object"===a(e)};var d=function isBoolean(e){return"boolean"===a(e)},p=n(0),y=n.n(p),b=n(1),h=n.n(b),m=n(3),g=n.n(m);var w=function isUndefined(e){return"undefined"===a(e)},O="[Circular]";var j=function clone(t){if(w(t))throw new Error("[chober]: nothing to clone.");try{return JSON.parse(JSON.stringify(t))}catch(e){if(l(t)){var n=function objectClone(e){var t=Object.keys(e).reduce(function(t,n){try{return JSON.stringify(e[n]),t}catch(e){return g()(t).concat([n])}},[]).reduce(function(e,t){return h()({},e,y()({},t,O))},e);return JSON.parse(JSON.stringify(t))}(t);if(!_(n))return n}if(v(t)){var r=function arrayClone(e){var t=e.reduce(function(t,e,n){try{return JSON.stringify(e),t}catch(e){return g()(t).concat([n])}},[]).reduce(function(e,t){return e[t]=O,e},e);return JSON.parse(JSON.stringify(t))}(t);if(!_(r))return r}throw new Error(e)}};var S=function isEqual(e,t){return JSON.stringify(j(e))===JSON.stringify(j(t))};var k=function getQuery(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=window.location.search.substr(1),r={};return t?(e.length&&o()(r,e.reduce(function(e,t){return h()({},e,y()({},t,[]))},{})),t.split("&").forEach(function(e){if(e){var n=e.split("=");Object.prototype.hasOwnProperty.call(r,n[0])&&(v(r[n[0]])?r[n[0]].push(n[1]):r[n[0]]=[r[n[0]],n[1]]),v(r[n[0]])?r[n[0]].forEach(function(e,t){r[n[0]][t]=decodeURIComponent(e)}):r[n[0]]=decodeURIComponent(n[1])}}),r):{}};var C=function getNumbers(e){return w(e)||!s(e)?"":String(e).replace(/\D+/g,"")};var x=function getScrollbarWidth(){return window.innerWidth-document.documentElement.clientWidth};var E=function getCookie(e){if(w(e))throw new Error("[chober]: key is not passed.");if(!s(e))throw new Error("[chober]: key must to be a string.");var t="; ".concat(document.cookie).split("; ".concat(e,"="));return 2===t.length?t.pop().split(";").shift():""};var q=function getOffset(e){if(w(e))throw new Error("[chober]: selector is not passed.");var t=document.querySelector(e).getBoundingClientRect(),n=window.pageXOffset,r=window.pageYOffset;return{x:t.left+n,y:t.top+r,left:t.left+n,top:t.top+r,right:t.right+n,bottom:t.bottom+r}};var N=function uniq(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];if(!v(e))throw new Error("[chober]: param must to be an array.");return j(e).map(function(e){return JSON.stringify(e)}).filter(function(e,t,n){return n.indexOf(e)===t}).map(function(e){return JSON.parse(e)})};var T=function flattenDeep(e){return v(e)?e.reduce(function(e,t){return v(t)?e.concat(flattenDeep(t)):e.concat(t)},[]):[]};var I=function setQuery(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=t.isSaveOld,r=void 0!==n&&n,o=t.isSaveHash,i=void 0===o||o,c=t.isSaveEmptyFields,u=void 0!==c&&c,f=Object.prototype.hasOwnProperty,a=e?Object.entries(e).reduce(function(e,t){var n=t[0],r=v(t[1])?N(T(t[1]).map(function(e){return String(e)})):t[1];return h()({},e,y()({},n,r))},{}):{},s=r&&k(),l=r&&Object.entries(a).concat(Object.entries(s)),d=i&&window.location.href.split("#")[1],p=r&&!_(s)?l.reduce(function(e,t){var n=t[0],r=t[1],o=f.call(e,n),i=f.call(s,n);if(!o||i)return o&&i?e:h()({},e,y()({},n,r));var c=e[n]===r?r:[e[n],r],u=v(e[n])?N(e[n].concat(r)):c,a=v(r)?N(r.concat(e[n])):u;return h()({},e,y()({},n,a))},{}):a,b=Object.keys(p).map(function(t){if("&"===t)return"";var e,n=p[t];return e=u?t?"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(n)):"":t&&n?"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(n)):"",v(n)?n.map(function(e){return u?t?"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e)):"":t&&e?"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e)):""}).filter(function(e){return e}).join("&"):e}).filter(function(e){return e}).join("&");window.history.pushState({},document.title,b?"?".concat(decodeURIComponent(b)).concat(d?"#".concat(d):""):window.location.href.split("?")[0].split("#")[0]+(d?"#".concat(d):""))};var U=function setCookie(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];if(w(e)||w(t))throw new Error("[chober]: key or value is not passed.");var r=n&&(new Date).getTime()+n,o=n&&new Date(r).toUTCString(),i="".concat(e,"=").concat(t,"; path=/"),c="; expires=".concat(o);document.cookie=n?i:i+c};var R=function removeCookie(e){if(w(e))throw new Error("[chober]: key is not passed.");document.cookie="".concat(e,"=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;")};var J=function decodeHtml(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value};var P=function invertObject(e){if(w(e))throw new Error("[chober]: object is not passed.");return e&&Object.entries(e).reduce(function(e,t){return h()({},e,y()({},t[1],t[0]))},{})};var A=function first(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;return v(e)?e.slice(0,t):[]};var D=function formatNumber(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:" ";return String(e||0).replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g,"$1".concat(t))};var M=function debounce(r,o){var i=this;if(!r&&!o)throw new Error("[chober]: function or delay is not passed.");var c=null;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];c&&clearTimeout(c),c=setTimeout(function onComplete(){r.apply(i,t),c=null},o)}};var H=function scrollTo(e){if(w(e))throw new Error("[chober]: element is not passed.");e.scrollIntoView({behavior:"smooth"})};n.d(t,"VERSION",function(){return Q}),n.d(t,"isEmpty",function(){return _}),n.d(t,"isArray",function(){return v}),n.d(t,"isNumber",function(){return f}),n.d(t,"isString",function(){return s}),n.d(t,"isObject",function(){return l}),n.d(t,"isBoolean",function(){return d}),n.d(t,"isEqual",function(){return S}),n.d(t,"isUndefined",function(){return w}),n.d(t,"getQuery",function(){return k}),n.d(t,"getNumbers",function(){return C}),n.d(t,"getScrollbarWidth",function(){return x}),n.d(t,"getCookie",function(){return E}),n.d(t,"getOffset",function(){return q}),n.d(t,"getType",function(){return a}),n.d(t,"setQuery",function(){return I}),n.d(t,"setCookie",function(){return U}),n.d(t,"removeCookie",function(){return R}),n.d(t,"decodeHtml",function(){return J}),n.d(t,"clone",function(){return j}),n.d(t,"invertObject",function(){return P}),n.d(t,"first",function(){return A}),n.d(t,"flattenDeep",function(){return T}),n.d(t,"formatNumber",function(){return D}),n.d(t,"debounce",function(){return M}),n.d(t,"scrollTo",function(){return H}),n.d(t,"uniq",function(){return N});
/**

@@ -3,0 +3,0 @@ * Chober.js - is a collection of useful methods that are used by programmers every day.

![logo](_media/logo.png)
# Chober <small>1.2.2</small>
# Chober <small>1.2.3</small>

@@ -5,0 +5,0 @@ > Is a collection of useful methods.

@@ -37,3 +37,3 @@ # Chober.js

<!-- With version -->
<script src="https://cdn.jsdelivr.net/npm/chober@1.2.2/dist/chober.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chober@1.2.3/dist/chober.min.js"></script>
```

@@ -221,4 +221,3 @@

```JS
flattenDeep([123, [456, [567, [890]]]])
// => [123, 456, 567, 890]
flattenDeep([123, [456, [567, [890]]]]) // => [123, 456, 567, 890]
```

@@ -557,7 +556,3 @@ <a href="https://github.com/BrooonS/chober/blob/master/lib/flattenDeep.js" target="_blank">Source code</a>

```JS
isUndefined(undefined)
// => true
isUndefined('testValue')
// => false
isUndefined(undefined) // => true isUndefined('testValue') // => false
```

@@ -564,0 +559,0 @@ <a href="https://github.com/BrooonS/chober/blob/master/lib/isUndefined.js" target="_blank">Source code</a>

@@ -0,0 +0,0 @@ import isArray from './isArray';

@@ -0,0 +0,0 @@ import getType from './getType';

{
"name": "chober",
"version": "1.2.2",
"version": "1.2.3",
"description": "Chober.js - is a collection of methods that are used by programmers every day. We decided to put all the methods together so as not to copy them from project to project.",

@@ -61,12 +61,12 @@ "main": "dist/chober.js",

"devDependencies": {
"@babel/core": "^7.1.2",
"@babel/core": "^7.1.6",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-transform-object-assign": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.1.0",
"@babel/preset-env": "^7.1.0",
"@babel/runtime": "^7.1.2",
"@babel/preset-env": "^7.1.6",
"@babel/runtime": "^7.1.5",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.4",
"docsify-cli": "^4.2.1",
"eslint": "^5.6.1",
"docsify-cli": "^4.3.0",
"eslint": "^5.9.0",
"eslint-config-airbnb": "^17.1.0",

@@ -79,5 +79,5 @@ "eslint-loader": "^2.1.1",

"uglifyjs-webpack-plugin": "^2.0.1",
"webpack": "^4.23.1",
"webpack": "^4.26.0",
"webpack-cli": "^3.1.2"
}
}

@@ -32,3 +32,3 @@ # Chober.js

<!-- With version -->
<script src="https://cdn.jsdelivr.net/npm/chober@1.2.2/dist/chober.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chober@1.2.3/dist/chober.min.js"></script>
```

@@ -35,0 +35,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc