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

chober

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chober - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

10

dist/chober.js

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

if (!part) return;
console.log(123);
var item = part.split('='); // If item already exists, create an array with this item.

@@ -1095,3 +1094,6 @@

}).join('&') : fieldValue;
}).join('&');
}).filter(function (queryItem) {
return queryItem;
}) // Remove empty queries
.join('&');
window.history.pushState({}, document.title, newQueryString ? "?".concat(decodeURIComponent(newQueryString)) : '?');

@@ -1249,3 +1251,3 @@ }

module.exports = {"name":"chober","version":"1.0.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","getQuery","getNumbers","getScrollbarWidth","getCookie","getOffset","getType","setQuery","setCookie","removeCookie","clone","invertObject","first","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.20.2","webpack-cli":"^3.1.2"}};
module.exports = {"name":"chober","version":"1.0.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","getQuery","getNumbers","getScrollbarWidth","getCookie","getOffset","getType","setQuery","setCookie","removeCookie","clone","invertObject","first","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.20.2","webpack-cli":"^3.1.2"}};

@@ -1255,2 +1257,2 @@ /***/ })

/******/ });
});
});

4

dist/chober.min.js

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

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

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

*/
var R=u.a;r.default=new function Chober(){c()(this,Chober),o()(this,{VERSION:R,isEmpty:a,isArray:s,isNumber:l,isString:p,isObject:d,isBoolean:b,getQuery:v,getNumbers:g,getScrollbarWidth:m,getCookie:O,getOffset:j,getType:f,setQuery:C,setCookie:x,removeCookie:E,clone:S,invertObject:q,first:T,formatNumber:N,debounce:P,scrollTo:I,uniq:k})}}])});
var R=u.a;r.default=new function Chober(){c()(this,Chober),o()(this,{VERSION:R,isEmpty:a,isArray:s,isNumber:p,isString:l,isObject:d,isBoolean:b,getQuery:v,getNumbers:g,getScrollbarWidth:m,getCookie:O,getOffset:j,getType:f,setQuery:C,setCookie:x,removeCookie:E,clone:S,invertObject:q,first:T,formatNumber:N,debounce:P,scrollTo:I,uniq:k})}}])});
![logo](_media/logo.png)
# Chober <small>1.0.2</small>
# Chober <small>1.0.3</small>

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

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

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

@@ -128,4 +128,3 @@

```JS
clone([1, null, '3'])
// => [1, null, '3']
clone([1, null, '3']) // => [1, null, '3']
```

@@ -144,7 +143,7 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/clone.js" target="_blank">Source code</a>

- Type: `function`
- `delay`
- Type: `Number`
#### Returns

@@ -155,5 +154,3 @@ - `function`

```JS
window.addEventListener('scroll', debounce(() => {
console.log(Math.random());
}, 100));
window.addEventListener('scroll', debounce(() => { console.log(Math.random()); }, 100));
```

@@ -172,3 +169,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/debounce.js" target="_blank">Source code</a>

- Type: `Array`
- `number`

@@ -183,7 +180,3 @@ - Type: `Number`

```JS
first([1, null, '3'])
// => [1]
first([1, null, '3'], 2)
// => [1, null]
first([1, null, '3']) // => [1] first([1, null, '3'], 2) // => [1, null]
```

@@ -202,3 +195,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/first.js" target="_blank">Source code</a>

- Type: `Number,String`
- `symbol`

@@ -213,7 +206,3 @@ - Type: `String`

```JS
formatNumer(1234)
// => '1 234'
formatNumer('1234', ',')
// => '1,234'
formatNumer(1234) // => '1 234' formatNumer('1234', ',') // => '1,234'
```

@@ -260,4 +249,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/formatNumber.js" target="_blank">Source code</a>

```JS
getNumbers('+7 (123) 456-78-90')
// => '71234567890'
getNumbers('+7 (123) 456-78-90') // => '71234567890'
```

@@ -283,4 +271,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/getNumbers.js" target="_blank">Source code</a>

```JS
getOffset('#element').left
// => 8
getOffset('#element').left // => 8
```

@@ -306,6 +293,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/getOffset.js" target="_blank">Source code</a>

```JS
// http://github.com/?value=test&field=hi&field=hello
getQuery()
// => { value: 'test', field: ['hi', 'hello'] }
// http://github.com/?value=test&field=hi&field=hello getQuery() // => { value: 'test', field: ['hi', 'hello'] }
```

@@ -344,7 +328,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/getQuery.js" target="_blank">Source code</a>

```JS
getType({})
// => 'object'
getType([])
// => 'array'
getType({}) // => 'object' getType([]) // => 'array'
```

@@ -370,4 +350,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/getType.js" target="_blank">Source code</a>

```JS
invertObject({ key: 'value' })
// => { value: 'key' }
invertObject({ key: 'value' }) // => { value: 'key' }
```

@@ -391,7 +370,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/invertObject.js" target="_blank">Source code</a>

```JS
isArray([])
// => true
isArray({})
// => false
isArray([]) // => true isArray({}) // => false
```

@@ -415,7 +390,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/isArray.js" target="_blank">Source code</a>

```JS
isBoolean(true)
// => true
isBoolean([])
// => false
isBoolean(true) // => true isBoolean([]) // => false
```

@@ -441,22 +412,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/isBoolean.js" target="_blank">Source code</a>

```JS
isEmpty({ test: 'some value' })
// => false
isEmpty([1, null, '3'])
// => false
isEmpty('qwe')
// => false
isEmpty(true)
// => true
isEmpty(1)
// => true
isEmpty(undefined)
// => true
isEmpty(null)
// => true
isEmpty({ test: 'some value' }) // => false isEmpty([1, null, '3']) // => false isEmpty('qwe') // => false isEmpty(true) // => true isEmpty(1) // => true isEmpty(undefined) // => true isEmpty(null) // => true
```

@@ -480,7 +432,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/isEmpty.js" target="_blank">Source code</a>

```JS
isNumber(123)
// => true
isNumber([])
// => false
isNumber(123) // => true isNumber([]) // => false
```

@@ -504,7 +452,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/isNumber.js" target="_blank">Source code</a>

```JS
isObject({})
// => true
isObject(123)
// => false
isObject({}) // => true isObject(123) // => false
```

@@ -528,7 +472,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/isObject.js" target="_blank">Source code</a>

```JS
isString('string')
// => true
isString([])
// => false
isString('string') // => true isString([]) // => false
```

@@ -618,11 +558,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/isString.js" target="_blank">Source code</a>

```JS
setQuery({ test: 'value' })
// => /?test=value
setQuery({ test: ['12', '34'] })
// => /?test=12&test=34
// https://github.com/?test=value&field=test
setQuery({ test: 'field' }, true)
// => https://github.com/?test=value&test=field&field=test
setQuery({ test: 'value' }) // => /?test=value setQuery({ test: ['12', '34'] }) // => /?test=12&test=34 // https://github.com/?test=value&field=test setQuery({ test: 'field' }, true) // => https://github.com/?test=value&test=field&field=test
```

@@ -648,4 +580,3 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/setQuery.js" target="_blank">Source code</a>

```JS
uniq(['test', 'field', 'test'])
// => ['test', 'field']
uniq(['test', 'field', 'test']) // => ['test', 'field']
```

@@ -652,0 +583,0 @@ <a href="https://github.com/BrooonS/chober/tree/master/lib/uniq.js" target="_blank">Source code</a>

@@ -32,3 +32,2 @@ import isArray from './isArray';

if (!part) return;
console.log(123);

@@ -35,0 +34,0 @@ const item = part.split('=');

@@ -74,2 +74,3 @@ import getQuery from './getQuery';

})
.filter(queryItem => queryItem) // Remove empty queries
.join('&');

@@ -76,0 +77,0 @@

{
"name": "chober",
"version": "1.0.2",
"version": "1.0.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.",

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

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

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

@@ -34,0 +34,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