pp-is 1.0.9 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pp-is",
3
3
  "description": "Collection of methods for check",
4
- "version": "1.0.9",
4
+ "version": "1.1.0",
5
5
  "main": "pp-is.js",
6
6
  "scripts": {
7
7
  "compile": "terser --output pp-is.min.js --compress --mangle --comments false -- pp-is.js"
package/pp-is.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!!
2
2
  * Power Panel pp-is <https://github.com/carlos-sweb/pp-is>
3
3
  * @author Carlos Illesca
4
- * @version 1.0.9 (2022/09/11 23:09 PM)
4
+ * @version 1.1.0 (2022/10/02 20:41 PM)
5
5
  * Released under the MIT License
6
6
  */
7
7
  (function(global,factory){
@@ -38,7 +38,7 @@
38
38
  function isUndefined( value ){ return getType( value ) === '[object Undefined]'}
39
39
  // =======================================================================
40
40
  function isEmpty( value ){
41
- if(isStringetType(value)){ return value === ""; }
41
+ if(isString(value)){ return value === ""; }
42
42
  if(isArray(value) ){ return value.length == 0; }
43
43
  if(isObject(value) ){ return Object.keys(value).length === 0;}
44
44
  return true;
package/pp-is.min.js CHANGED
@@ -1 +1 @@
1
- !function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("ppIs",t):(n=n||self).ppIs=t()}(this,(function(){function n(n){return Object.prototype.toString.call(n)}function t(t){return"[object Array]"===n(t)}function e(t){return"[object Function]"===n(t)}function i(t){return"[object Object]"===n(t)}var r=function(n){return function(t,i){return e(i)?n(t)?i(t):void 0:n(t)}};return{isArray:r(t),isBoolean:r((function(t){return!0===t||!1===t||"[object Boolean]"===n(t)})),isDate:r((function(t){return"[object Date]"===n(t)})),isElement:r((function(n){return!(!n||1!==n.nodeType)})),isEmpty:r((function(n){return isStringetType(n)?""===n:t(n)?0==n.length:!i(n)||0===Object.keys(n).length})),isFunction:r(e),isNull:r((function(t){return"[object Null]"===n(t)})),isNumber:r((function(t){return"[object Number]"===n(t)})),isObject:r(i),isString:r((function(t){return"[object String]"===n(t)})),isUndefined:r((function(t){return"[object Undefined]"===n(t)})),isEmail:r((function(n){return/^([a-z0-9_-]+[a-z0-9._-]+?)@([a-z0-9-]+\.[a-z]{2,6}|[a-z0-9]+\.[a-z]{2,6}\.[a-z]{2,6})$/i.test(n)})),isNaN:r((function(n){return Number.isNaN(parseInt(n))})),isRegExp:r((function(t){return"[object RegExp]"===n(t)})),isUrl:r((function(n){return/^(https?:\/\/)?([w]{3}\.|[w]{3}2\.)?([a-z\d]+\.)?([a-z\d]+\.[a-z]{2,}|localhost|[\d]+\.[\d]+\.[\d]+\.[\d]+)(\:[\d]+)?([\??\/?]+[\/;&a-z\d%_.~+=-]*)?(\#[\/;&a-z\d%_.~+=-]*)?$/gi.test(n)}))}}));
1
+ !function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("ppIs",t):(n=n||self).ppIs=t()}(this,(function(){function n(n){return Object.prototype.toString.call(n)}function t(t){return"[object Array]"===n(t)}function e(t){return"[object Function]"===n(t)}function r(t){return"[object Object]"===n(t)}function i(t){return"[object String]"===n(t)}var o=function(n){return function(t,r){return e(r)?n(t)?r(t):void 0:n(t)}};return{isArray:o(t),isBoolean:o((function(t){return!0===t||!1===t||"[object Boolean]"===n(t)})),isDate:o((function(t){return"[object Date]"===n(t)})),isElement:o((function(n){return!(!n||1!==n.nodeType)})),isEmpty:o((function(n){return i(n)?""===n:t(n)?0==n.length:!r(n)||0===Object.keys(n).length})),isFunction:o(e),isNull:o((function(t){return"[object Null]"===n(t)})),isNumber:o((function(t){return"[object Number]"===n(t)})),isObject:o(r),isString:o(i),isUndefined:o((function(t){return"[object Undefined]"===n(t)})),isEmail:o((function(n){return/^([a-z0-9_-]+[a-z0-9._-]+?)@([a-z0-9-]+\.[a-z]{2,6}|[a-z0-9]+\.[a-z]{2,6}\.[a-z]{2,6})$/i.test(n)})),isNaN:o((function(n){return Number.isNaN(parseInt(n))})),isRegExp:o((function(t){return"[object RegExp]"===n(t)})),isUrl:o((function(n){return/^(https?:\/\/)?([w]{3}\.|[w]{3}2\.)?([a-z\d]+\.)?([a-z\d]+\.[a-z]{2,}|localhost|[\d]+\.[\d]+\.[\d]+\.[\d]+)(\:[\d]+)?([\??\/?]+[\/;&a-z\d%_.~+=-]*)?(\#[\/;&a-z\d%_.~+=-]*)?$/gi.test(n)}))}}));