pp-is 1.2.4 → 1.2.5

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/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Carlos Enrique Illesca Monsalve
3
+ Copyright (c) 2025 Carlos Enrique Illesca Monsalve
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  In the web project include pp-is.js with:
6
6
 
7
7
  ```html
8
- <script src="https://cdn.jsdelivr.net/npm/pp-is@1.2.4/pp-is.min.js" ></script>
8
+ <script src="https://cdn.jsdelivr.net/npm/pp-is@1.2.5/pp-is.min.js" ></script>
9
9
  ```
10
10
 
11
11
  Or
package/README_es.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Incluye pp-is.js en tu proyecto web:
6
6
  ```html
7
- <script src="https://cdn.jsdelivr.net/npm/pp-is@1.2.4/pp-is.min.js" ></script>
7
+ <script src="https://cdn.jsdelivr.net/npm/pp-is@1.2.5/pp-is.min.js" ></script>
8
8
  ```
9
9
 
10
10
  O
@@ -4,5 +4,5 @@
4
4
  * @param { Any } value - Any Value
5
5
  * @return {boolean}
6
6
  */
7
- const isNaN = ( value )=>(Number.isNaN( parseInt(value)))
7
+ const isNaN = ( value )=>(Number.isNaN( Number.parseInt(value)))
8
8
  export { isNaN as default }
@@ -1,10 +1,11 @@
1
1
  import getTypeCompare from "./../helper/getTypeCompare.js"
2
+ import isNaN from "./isNaN.js"
2
3
  /**
3
4
  * @function isNumber
4
5
  * @description - Checks if value is a Number.
5
6
  * @param { Any } value - Any value
6
7
  * @return {boolean}
7
8
  */
8
- const isNumber=(value)=>getTypeCompare(value,'Number')
9
+ const isNumber=(value)=>getTypeCompare(value,'Number') && !isNaN(value)
9
10
  export { isNumber as default }
10
11
 
package/dist/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.2.4 (2025/05/27 23:52 PM)
4
+ * @version 1.2.5 (2025/06/01 21:58 PM)
5
5
  * Released under the MIT License
6
6
  */
7
7
  import isString from "./main/isString.js"
@@ -13,8 +13,8 @@ import isDate from "./main/isDate.js"
13
13
  import isFunction from "./main/isFunction.js"
14
14
  import isUndefined from "./main/isUndefined.js"
15
15
  import isNull from "./main/isNull.js"
16
- import isNumber from "./main/isNumber.js"
17
16
  import isNaN from "./main/isNaN.js"
17
+ import isNumber from "./main/isNumber.js"
18
18
  import isEmail from "./main/isEmail.js"
19
19
  import isUrl from "./main/isUrl.js"
20
20
  import isEmpty from "./main/isEmpty.js"
package/dist/pp-is.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).ppIs=t()}(this,(function(){"use strict";const e=(e,t)=>(e=>Object.prototype.toString.call(e))(e)==="[object "+t+"]",t=t=>e(t,"String"),i=t=>e(t,"Array"),o=t=>e(t,"Object"),n=t=>!0===t||!1===t||e(t,"Boolean"),s=t=>e(t,"Function"),d=(e,t,i)=>{const o=e(t);return n(o)?o:i},l=e=>(t,i,o)=>((e,t,i,o)=>{const n=e(t);return n?!s(i)||d(i,t,n):!!s(o)&&d(o,t,n)})(e,t,i,o);return{isArray:l(i),isBoolean:l(n),isDate:l((t=>e(t,"Date"))),isElement:l((e=>!(!e||1!==e.nodeType))),isEmpty:l((e=>t(e)?""===e:i(e)?0==e.length:!o(e)||0===Object.keys(e).length)),isFunction:l(s),isNull:l((t=>e(t,"Null"))),isNumber:l((t=>e(t,"Number"))),isObject:l(o),isString:l(t),isUndefined:l((t=>e(t,"Undefined"))),isEmail:l((e=>/^([a-z1-9\._-]+)@([a-z0-9-]+\.[a-z]{2,11}|[a-z0-9]+\.[a-z]{2,24}\.[a-z]{2,24})$/i.test(e))),isNaN:l((e=>Number.isNaN(parseInt(e)))),isRegExp:l((t=>e(t,"RegExp"))),isUrl:l((e=>/^(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(e))),isNodeList:l((e=>"undefined"!=typeof NodeList&&NodeList.prototype.isPrototypeOf(e))),isHTMLCollection:l((e=>"undefined"!=typeof HTMLCollection&&HTMLCollection.prototype.isPrototypeOf(e)))}}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).ppIs=t()}(this,(function(){"use strict";const e=(e,t)=>(e=>Object.prototype.toString.call(e))(e)==="[object "+t+"]",t=t=>e(t,"String"),i=t=>e(t,"Array"),o=t=>e(t,"Object"),n=t=>!0===t||!1===t||e(t,"Boolean"),s=t=>e(t,"Function"),d=e=>Number.isNaN(Number.parseInt(e)),l=(e,t,i)=>{const o=e(t);return n(o)?o:i},r=e=>(t,i,o)=>((e,t,i,o)=>{const n=e(t);return n?!s(i)||l(i,t,n):!!s(o)&&l(o,t,n)})(e,t,i,o);return{isArray:r(i),isBoolean:r(n),isDate:r((t=>e(t,"Date"))),isElement:r((e=>!(!e||1!==e.nodeType))),isEmpty:r((e=>t(e)?""===e:i(e)?0==e.length:!o(e)||0===Object.keys(e).length)),isFunction:r(s),isNull:r((t=>e(t,"Null"))),isNumber:r((t=>e(t,"Number")&&!d(t))),isObject:r(o),isString:r(t),isUndefined:r((t=>e(t,"Undefined"))),isEmail:r((e=>/^([a-z1-9\._-]+)@([a-z0-9-]+\.[a-z]{2,11}|[a-z0-9]+\.[a-z]{2,24}\.[a-z]{2,24})$/i.test(e))),isNaN:r(d),isRegExp:r((t=>e(t,"RegExp"))),isUrl:r((e=>/^(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(e))),isNodeList:r((e=>"undefined"!=typeof NodeList&&NodeList.prototype.isPrototypeOf(e))),isHTMLCollection:r((e=>"undefined"!=typeof HTMLCollection&&HTMLCollection.prototype.isPrototypeOf(e)))}}));
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.2.4",
4
+ "version": "1.2.5",
5
5
  "main": "dist/pp-is.min.js",
6
6
  "scripts": {
7
7
  "build": "rollup -c && terser -o ./dist/pp-is.min.js --compress --mangle --comments false -- ./dist/pp-is.rollup.js && rm -rf ./dist/pp-is.rollup.js",