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 +1 -1
- package/README.md +1 -1
- package/README_es.md +1 -1
- package/dist/main/isNaN.js +1 -1
- package/dist/main/isNumber.js +2 -1
- package/dist/pp-is.js +2 -2
- package/dist/pp-is.min.js +1 -1
- package/package.json +1 -1
package/LICENSE.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
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
package/README_es.md
CHANGED
package/dist/main/isNaN.js
CHANGED
package/dist/main/isNumber.js
CHANGED
|
@@ -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
|
+
* @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},
|
|
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
|
+
"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",
|