pp-is 1.2.0 → 1.2.2

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Carlos Enrique Illesca Monsalve
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
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@latest/pp-is.min.js" ></script>
8
+ <script src="https://cdn.jsdelivr.net/npm/pp-is@1.2.2/pp-is.min.js" ></script>
9
9
  ```
10
10
 
11
11
  Or
@@ -94,6 +94,18 @@ Checks if value is a valid Url.
94
94
 
95
95
  ---
96
96
 
97
+ #### `isNodeList`
98
+
99
+ Checks if value is a valid NodeList.
100
+
101
+ ---
102
+
103
+ #### `isHTMLCollection`
104
+
105
+ Checks if value is a valid HTMLCollection.
106
+
107
+ ---
108
+
97
109
  ## How to use ?
98
110
 
99
111
  ```javascript
@@ -107,12 +119,28 @@ if( ppIs.isString(value) ){
107
119
 
108
120
  ### or
109
121
 
122
+
123
+
110
124
  ```javascript
125
+ // You can make an extra evaluation
126
+ const done = ( value ) => {
127
+ return value !== 'string';
128
+ }
111
129
 
112
- var value = "string...";
130
+ const reject = ( value ) => {
131
+
132
+ }
133
+
134
+ const value = 'string';
135
+
136
+ const result = ppIs.isString( value , done , reject );
113
137
 
114
- ppIs.isString( value , function( val ){
115
- // Enter your code here
116
- })
138
+ if( result ){
139
+
140
+ }else{
141
+
142
+ }
117
143
 
118
144
  ```
145
+
146
+ [Lea este documento en español](./README_es.md)
package/README_es.md ADDED
@@ -0,0 +1,146 @@
1
+ # pp-is
2
+
3
+ ## Para empezar
4
+
5
+ Incluye pp-is.js en tu proyecto web:
6
+ ```html
7
+ <script src="https://cdn.jsdelivr.net/npm/pp-is@1.2.2/pp-is.min.js" ></script>
8
+ ```
9
+
10
+ O
11
+
12
+ ## Instalación
13
+
14
+ ```console
15
+ npm i pp-is --save
16
+ ```
17
+ ## Metodos
18
+
19
+ #### `isArray`
20
+
21
+ Verifica si el valor es clasificado como un Objecto de Array.
22
+
23
+ ---
24
+ #### `isBoolean`
25
+
26
+ Verifica si el valor is verdadero ( true ) o falso ( false ).
27
+
28
+ ---
29
+ #### `isDate`
30
+
31
+ Verifica si el valor es una Fecha.
32
+
33
+ ---
34
+ #### `isElement`
35
+
36
+ verifica si el valor es un elemento del DOM
37
+
38
+
39
+ ---
40
+ #### `isFunction`
41
+
42
+ Verifica si el valor es una función
43
+
44
+ ---
45
+ #### `isNull`
46
+
47
+ Verifica si el valor es un nulo.
48
+
49
+ ---
50
+ #### `isNumber`
51
+
52
+ Verifica si el valor es un numero.
53
+
54
+ ---
55
+ #### `isObject`
56
+
57
+ verifica si el valor es clasificado como un objecto.
58
+
59
+ ---
60
+ #### `isString`
61
+
62
+ Varifica si el valor es una cadena de texto.
63
+
64
+ ---
65
+ #### `isUndefined`
66
+
67
+ verifica si el valor esta no definido.
68
+
69
+ ---
70
+ #### `isEmail`
71
+
72
+ Verifica si el valor es un correo electronico valido.
73
+
74
+ ---
75
+
76
+ ---
77
+ #### `isNaN`
78
+
79
+ Verifica si el valor es un numero valido proveniente de una cadena de texto.
80
+
81
+ ---
82
+
83
+ ---
84
+ #### `isRegExp`
85
+
86
+ Verifica si el valor es una expresion regular
87
+
88
+ ---
89
+
90
+ ---
91
+ #### `isUrl`
92
+
93
+ Verifica si el valor es una url valida.
94
+
95
+ ---
96
+
97
+ #### `isNodeList`
98
+
99
+ Verifica si el valor es un NodeList valido.
100
+
101
+ ---
102
+
103
+ #### `isHTMLCollection`
104
+
105
+ Verifica si el valor es un HTTMLCollection valido.
106
+
107
+ ---
108
+
109
+ ## ¿ Como se usa ?
110
+
111
+ ```javascript
112
+
113
+ var value = "string...";
114
+
115
+ if( ppIs.isString(value) ){
116
+ // Ingresa tu codigo aqui
117
+ }
118
+ ```
119
+
120
+ ### or
121
+
122
+
123
+
124
+ ```javascript
125
+ // Puedes hacer una evaluación extra
126
+ const done = ( value ) => {
127
+ return value !== 'string';
128
+ }
129
+
130
+ const reject = ( value ) => {
131
+
132
+ }
133
+
134
+ const value = 'string';
135
+
136
+ const result = ppIs.isString( value , done , reject );
137
+
138
+ if( result ){
139
+
140
+ }else{
141
+
142
+ }
143
+
144
+ ```
145
+
146
+ [Read this document in English](./README.md)
package/dist/pp-is.js ADDED
@@ -0,0 +1,321 @@
1
+ /*!!
2
+ * Power Panel pp-is <https://github.com/carlos-sweb/pp-is>
3
+ * @author Carlos Illesca
4
+ * @version 1.2.3 (2024/09/18 15:14 PM)
5
+ * Released under the MIT License
6
+ */
7
+ ;(function(){
8
+ "use strict";
9
+ /**
10
+ * @function getType
11
+ * @description - Gets the type name
12
+ * @param {Any} value - Value to check
13
+ * @returns {string}
14
+ * @example
15
+ * const s = 'Hello Word';
16
+ * console.log(getType(s))
17
+ * // [object String]
18
+ */
19
+ const getType=(value)=>Object.prototype.toString.call(value),
20
+ /**
21
+ * @description - This function checks for the presence of `define` in the global scope and checks if it is configured as an AMD module.
22
+ * @function getAMD
23
+ * @return {object} - define object if exists
24
+ */
25
+ getAMD = ()=>typeof define == 'function' && typeof define.amd == 'object' && define.amd,
26
+ /**
27
+ * @function isAMD
28
+ * @description - check if AMD is a Object
29
+ * @return {boolean} - AMD works
30
+ */
31
+ isAMD=()=>isObject(getAMD()),
32
+ /**
33
+ * @function getFreeGlobal
34
+ * @descriptcion - Detect free variable `global`
35
+ * @return {object}
36
+ */
37
+ getFreeGlobal=()=>(typeof global == 'object' && global && global.Object === Object && global),
38
+ /**
39
+ * @function getFreeGlobal
40
+ * @descriptcion - Detect free variable `self`
41
+ * @return {object}
42
+ */
43
+ getFreeSelf=()=>(typeof self == 'object' && self && self.Object === Object && self),
44
+ /**
45
+ * @name getRoot
46
+ * @description - Used as a reference to the global object.
47
+ * @function
48
+ * @return {object}
49
+ */
50
+ getRoot=()=>{
51
+ return getFreeGlobal() || getFreeSelf() || Function('return this')();
52
+ },
53
+ /**
54
+ * @function isFreeExports
55
+ * @description - Detect free variable `exports`
56
+ * @return {boolean} -
57
+ */
58
+ isFreeExports =()=>(typeof exports == 'object' && exports && !exports.nodeType && exports),
59
+ /**
60
+ * @function getFreeModule
61
+ * @description - Detect free variable `module`.
62
+ * @return {object} - variable `module`
63
+ */
64
+ getFreeModule=()=>(isFreeExports() && typeof module == 'object' && module && !module.nodeType && module),
65
+
66
+ /**
67
+ * @function isFreeModule
68
+ * @description - detect if variable module is Object
69
+ * @param { Any } value - Any value
70
+ * @return {boolean}
71
+ */
72
+ isFreeModule=()=>isObject(getFreeModule()),
73
+ /**
74
+ * @function getTypeCompare
75
+ * @description -
76
+ * @param {Any} value - Any Value
77
+ * @param {string} expression - Expression to compare
78
+ *
79
+ */
80
+ getTypeCompare=(value,expression)=>(getType(value) === "[object "+expression+"]"),
81
+ /**
82
+ * @function isNodeList
83
+ * @description - Checks if value is a valid NodeList.
84
+ * @param { Any } value - Any Value
85
+ * @return {boolean}
86
+ */
87
+ isNodeList=(value)=>(typeof NodeList === "undefined" ? false : NodeList.prototype.isPrototypeOf(value)),
88
+ /**
89
+ * @function isHTMLCollection
90
+ * @description - Checks if value is a valid HTMLCollection.
91
+ * @param { Any } value - Any Value
92
+ * @return {boolean}
93
+ */
94
+ isHTMLCollection=(value)=>(typeof HTMLCollection === "undefined" ? false : HTMLCollection.prototype.isPrototypeOf(value)),
95
+ /**
96
+ * @function isArray
97
+ * @description - Checks if value is classified as an Array object.
98
+ * @param { Any } value - Any Value
99
+ * @return {boolean}
100
+ */
101
+ isArray=(value)=>getTypeCompare(value,'Array'),
102
+ /**
103
+ * @function isRegExp
104
+ * @description - Checks if value is a RegExp.
105
+ * @param { Any } value - Any value
106
+ * @return {boolean}
107
+ */
108
+ isRegExp=(value)=>getTypeCompare(value,'RegExp'),
109
+ /**
110
+ * @function isBoolean
111
+ * @description - Checks if value is either true or false.
112
+ * @param { Any } value - Any value
113
+ * @return {boolean}
114
+ */
115
+ isBoolean=(value)=>value === true || value === false || getTypeCompare(value,'Boolean'),
116
+ /**
117
+ * @function isDate
118
+ * @description - isDate
119
+ * @param { Any } value - Any value
120
+ * @return {boolean}
121
+ */
122
+ isDate=(value)=>getTypeCompare(value,'Date'),
123
+ /**
124
+ * @function isElement
125
+ * @description - isElement
126
+ * @param { Any } value - Any value
127
+ * @return {boolean}
128
+ */
129
+ isElement=(value)=>!!( value && value.nodeType === 1 ) ,
130
+ /**
131
+ * @function isFunction
132
+ * @description - Checks if value is a Function.
133
+ * @param { Any } value - Any value
134
+ * @return {boolean}
135
+ */
136
+ isFunction=(value) =>getTypeCompare(value,'Function'),
137
+ /**
138
+ * @function isNull
139
+ * @description - Checks if value is a Null.
140
+ * @param { Any } value - Any value
141
+ * @return {boolean}
142
+ */
143
+ isNull=(value)=>getTypeCompare(value,'Null'),
144
+ /**
145
+ * @function isNumber
146
+ * @description - Checks if value is a Number.
147
+ * @param { Any } value - Any value
148
+ * @return {boolean}
149
+ */
150
+ isNumber=(value)=>getTypeCompare(value,'Number'),
151
+ /**
152
+ * @function isObject
153
+ * @description - Checks if value is classified as an Object.
154
+ * @param { Any } value - Any value
155
+ * @return {boolean}
156
+ */
157
+ isObject=(value)=>getTypeCompare(value,'Object'),
158
+ /**
159
+ * @function isString
160
+ * @description - Checks if value is a string.
161
+ * @param { Any } value - Any value
162
+ * @return {boolean}
163
+ */
164
+ isString=(value)=>getTypeCompare(value,'String'),
165
+ /**
166
+ * @function isUndefined
167
+ * @description - Checks if value is a undefined.
168
+ * @param { Any } value - Any value
169
+ * @return {boolean}
170
+ */
171
+ isUndefined=(value)=>getTypeCompare(value,'Undefined'),
172
+ /**
173
+ * @function isEmpty
174
+ * @description - Checks if value is not empty
175
+ * @param { Any } value - Any value
176
+ * @example
177
+ * // this a empty string
178
+ * is.isEmpty("")
179
+ * // return true
180
+ * @example
181
+ * // this a empty array
182
+ * is.isEmpty([])
183
+ * // return true
184
+ * @example
185
+ * // this a empty Object
186
+ * is.isEmpty({})
187
+ * // return true
188
+ * @return {boolean}
189
+ */
190
+ isEmpty=(value)=>{
191
+ if(isString(value)){return value === ""}
192
+ else if(isArray(value)){return value.length == 0}
193
+ else if(isObject(value)){return Object.keys(value).length === 0}
194
+ return true;
195
+ },
196
+ /**
197
+ * @function isEmail
198
+ * @description - Checks if value is a valid email.
199
+ * @param { Any } value - Any Value
200
+ * @example
201
+ * is.isEmail("h@blog.mydomian.xyz")
202
+ * // return true
203
+ * @return {boolean}
204
+ */
205
+ isEmail = ( value )=>/^([a-z1-9\._-]+)@([a-z0-9-]+\.[a-z]{2,11}|[a-z0-9]+\.[a-z]{2,24}\.[a-z]{2,24})$/i.test( value ),
206
+ /**
207
+ * @function isNaN
208
+ * @description - Checks if value is a valid Number from String.
209
+ * @param { Any } value - Any Value
210
+ * @return {boolean}
211
+ */
212
+ isNaN = ( value )=>(Number.isNaN( parseInt(value))),
213
+ // =======================================================================
214
+ // ^(https?:\/\/)?([w]{3}\.|[w]{3}2\.)? protocol
215
+ // ([w]{3}\.|[w]{3}2\.)? ([a-z\d]+\.)?([a-z\d]+\.[a-z]{2,} Domain name www or www2
216
+ // localhost -> include this word
217
+ // [\d]+\.[\d]+\.[\d]+\.[\d]+ -> add ipv4
218
+ // (\:[\d]+)? -> port
219
+ // ([\??\/?]+[\/;&a-z\d%_.~+=-]*)? -> query url
220
+ // (\#[\/;&a-z\d%_.~+=-]*)? -> hashtag url
221
+ /**
222
+ * @function isUrl
223
+ * @description - Checks if value is a valid Url.
224
+ * @param { Any } value - Any Value
225
+ * @return {boolean}
226
+ */
227
+ isUrl = ( value )=>/^(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(value),
228
+
229
+ // =======================================================================
230
+ /**
231
+ * @function baseSanetize
232
+ * @description - Trabajar Aqui
233
+ * @param { function } doneOrReject - Custom function that is triggered when the positive hook or negative hook is defined by the user. This function can resolve true or false independent of the first evaluation or it can simply do nothing.
234
+ * @param { Any } value - The value to evaluate
235
+ * @param { boolean } evaluate - pre evaulate from static function isString,isUndefined,..etc
236
+ * @return { boolean } - evaluate
237
+ */
238
+ baseSanetize = ( doneOrReject , value , evaluate )=> {
239
+ const response = doneOrReject(value);
240
+ return isBoolean( response ) ? response : evaluate;
241
+ },
242
+ /**
243
+ * @function baseEvaluate
244
+ * @description - Responsible for evaluation
245
+ * @param {function} func - Evaluative function
246
+ * @param {Any} value - The value to evaluate
247
+ * @param {function} done - Function to be executed in case the evaluation is positive.
248
+ * @param {function} reject - Function to be executed in case the evaluation is negative.
249
+ * @return {boolean} - value of the evaluation
250
+ */
251
+ baseEvaluate = (func , value , done , reject) => {
252
+ const evaluate = func(value);
253
+ return evaluate ? isFunction( done ) ? baseSanetize(done,value,evaluate) : true : isFunction( reject ) ? baseSanetize(reject,value,evaluate) : false ;
254
+ },
255
+ /**
256
+ * @function base
257
+ * @description - This function stretches to baseEvaluate passing as parameter the function that specifically evaluates the given value to be evaluated, but in the baseEvaluate function it arrives as a parameter called func
258
+ * @param {function} func - Evaluative function
259
+ * @return {function} - function to execute baseEvaluate
260
+ * @example
261
+ * const hello = "hello Word!";
262
+ * const evaluate = base(isString)(hello)
263
+ * //return true
264
+ */
265
+ base = ( func ) => ( value ,done , reject) => baseEvaluate( func , value , done , reject),
266
+ /**
267
+ * @description - Obtains the object to be exported with the following main functions
268
+ * @name is
269
+ * @type {object}
270
+ * @property {function} isArray - {@link isArray}
271
+ * @property {function} isBoolean - {@link isBoolean}
272
+ * @property {function} isDate - {@link isDate}
273
+ * @property {function} isElement - {@link isElement}
274
+ * @property {function} isEmpty - {@link isEmpty}
275
+ * @property {function} isFunction - {@link isFunction}
276
+ * @property {function} isNull - {@link isNull}
277
+ * @property {function} isNumber - {@link isNumber}
278
+ * @property {function} isString - {@link isString}
279
+ * @property {function} isUndefined - {@link isUndefined}
280
+ * @property {function} isEmail - {@link isEmail}
281
+ * @property {function} isNaN - {@link isNaN}
282
+ * @property {function} isRegExp - {@link isRegExp}
283
+ * @property {function} isUrl - {@link isUrl}
284
+ * @property {function} isNodeList - {@link isNodeList}
285
+ * @property {function} isHTMLCollection - {@link isHTMLCollection}
286
+ * @property {function} isAMD - {@link isAMD}
287
+ * @property {function} isFreeModule - {@link isFreeModule}
288
+ * @property {function} getRoot - {@link getRoot}
289
+ */
290
+ is = {
291
+ 'isArray':base(isArray),
292
+ 'isBoolean':base(isBoolean),
293
+ 'isDate':base(isDate),
294
+ 'isElement':base(isElement),
295
+ 'isEmpty':base(isEmpty),
296
+ 'isFunction':base(isFunction),
297
+ 'isNull':base(isNull),
298
+ 'isNumber':base(isNumber),
299
+ 'isObject':base(isObject),
300
+ 'isString':base(isString),
301
+ 'isUndefined':base(isUndefined),
302
+ 'isEmail':base(isEmail),
303
+ 'isNaN':base(isNaN),
304
+ 'isRegExp':base(isRegExp),
305
+ 'isUrl':base(isUrl),
306
+ 'isNodeList':base(isNodeList),
307
+ 'isHTMLCollection':base(isHTMLCollection),
308
+ 'isAMD':base(isAMD),
309
+ 'isFreeModule':base(isFreeModule),
310
+ 'getRoot':getRoot
311
+ }
312
+
313
+
314
+ //
315
+ is.isAMD(null,()=>{define(()=>is)},()=>{
316
+ is.isFreeModule(null,()=>{ module.exports = is; },()=>{
317
+ is.getRoot().ppIs = is
318
+ })
319
+ });
320
+
321
+ }.call(this))
@@ -0,0 +1 @@
1
+ (function(){"use strict";const e=()=>"object"==typeof exports&&exports&&!exports.nodeType&&exports&&"object"==typeof module&&module&&!module.nodeType&&module,t=(e,t)=>(e=>Object.prototype.toString.call(e))(e)==="[object "+t+"]",o=e=>t(e,"Array"),i=e=>!0===e||!1===e||t(e,"Boolean"),s=e=>t(e,"Function"),l=e=>t(e,"Object"),n=e=>t(e,"String"),d=(e,t,o)=>{const s=e(t);return i(s)?s:o},p=e=>(t,o,i)=>((e,t,o,i)=>{const l=e(t);return l?!s(o)||d(o,t,l):!!s(i)&&d(i,t,l)})(e,t,o,i),r={isArray:p(o),isBoolean:p(i),isDate:p((e=>t(e,"Date"))),isElement:p((e=>!(!e||1!==e.nodeType))),isEmpty:p((e=>n(e)?""===e:o(e)?0==e.length:!l(e)||0===Object.keys(e).length)),isFunction:p(s),isNull:p((e=>t(e,"Null"))),isNumber:p((e=>t(e,"Number"))),isObject:p(l),isString:p(n),isUndefined:p((e=>t(e,"Undefined"))),isEmail:p((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:p((e=>Number.isNaN(parseInt(e)))),isRegExp:p((e=>t(e,"RegExp"))),isUrl:p((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:p((e=>"undefined"!=typeof NodeList&&NodeList.prototype.isPrototypeOf(e))),isHTMLCollection:p((e=>"undefined"!=typeof HTMLCollection&&HTMLCollection.prototype.isPrototypeOf(e))),isAMD:p((()=>l("function"==typeof define&&"object"==typeof define.amd&&define.amd))),isFreeModule:p((()=>l(e()))),getRoot:()=>"object"==typeof global&&global&&global.Object===Object&&global||"object"==typeof self&&self&&self.Object===Object&&self||Function("return this")()};r.isAMD(null,(()=>{define((()=>r))}),(()=>{r.isFreeModule(null,(()=>{module.exports=r}),(()=>{r.getRoot().ppIs=r}))}))}).call(this);
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "pp-is",
3
3
  "description": "Collection of methods for check",
4
- "version": "1.2.0",
4
+ "version": "1.2.2",
5
5
  "main": "pp-is.js",
6
- "scripts": {
7
- "compile": "terser --output pp-is.min.js --compress --mangle --comments false -- pp-is.js"
6
+ "scripts" :{
7
+ "djs":"documentation build ./dist/pp-is.js -f html -o ./djs && php -S localhost:8091 -t ./djs",
8
+ "docs" : "jsdoc ./dist/pp-is.js -d docs && php -S localhost:8091 -t ./docs",
9
+ "serve-webpack" : "cp dist/pp-is.js ./test/js/ && webpack --config ./test/config/webpack.config.js && php -S localhost:8090 -t ./test",
10
+ "compile" : "terser --output dist/pp-is.min.js --compress --mangle --comments false -- dist/pp-is.js"
8
11
  },
9
12
  "repository": {
10
13
  "type": "git",
@@ -0,0 +1,13 @@
1
+ const path = require('path');
2
+
3
+ module.exports = {
4
+ mode: 'production',
5
+ entry: [
6
+ path.resolve(__dirname,'..','js','main.webpack.js')
7
+ ],
8
+ output: {
9
+ path: path.resolve(__dirname, '..' ,'dist'),
10
+ filename: 'pp-is.app.bundle.js',
11
+ },
12
+ };
13
+
@@ -0,0 +1,2 @@
1
+ /*! For license information please see pp-is.app.bundle.js.LICENSE.txt */
2
+ (()=>{var e={343:function(e,t,o){var i;e=o.nmd(e),function(){"use strict";const n=(e,t)=>(e=>Object.prototype.toString.call(e))(e)==="[object "+t+"]",s=e=>n(e,"Array"),r=e=>!0===e||!1===e||n(e,"Boolean"),l=e=>n(e,"Function"),a=e=>n(e,"Object"),c=e=>n(e,"String"),d=(e,t,o)=>{const i=e(t);return r(i)?i:o},u=e=>(t,o,i)=>((e,t,o,i)=>{const n=e(t);return n?!l(o)||d(o,t,n):!!l(i)&&d(i,t,n)})(e,t,o,i),p={isArray:u(s),isBoolean:u(r),isDate:u((e=>n(e,"Date"))),isElement:u((e=>!(!e||1!==e.nodeType))),isEmpty:u((e=>c(e)?""===e:s(e)?0==e.length:!a(e)||0===Object.keys(e).length)),isFunction:u(l),isNull:u((e=>n(e,"Null"))),isNumber:u((e=>n(e,"Number"))),isObject:u(a),isString:u(c),isUndefined:u((e=>n(e,"Undefined"))),isEmail:u((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:u((e=>Number.isNaN(parseInt(e)))),isRegExp:u((e=>n(e,"RegExp"))),isUrl:u((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:u((e=>"undefined"!=typeof NodeList&&NodeList.prototype.isPrototypeOf(e))),isHTMLCollection:u((e=>"undefined"!=typeof HTMLCollection&&HTMLCollection.prototype.isPrototypeOf(e))),isAMD:u((()=>a(o.amdO))),isFreeModule:u((()=>a(t&&!t.nodeType&&t&&e&&!e.nodeType&&e))),getRoot:()=>"object"==typeof o.g&&o.g&&o.g.Object===Object&&o.g||"object"==typeof self&&self&&self.Object===Object&&self||Function("return this")()};p.isAMD(null,(()=>{void 0===(i=(()=>p).call(t,o,t,e))||(e.exports=i)}),(()=>{p.isFreeModule(null,(()=>{e.exports=p}),(()=>{p.getRoot().ppIs=p}))}))}.call(this)}},t={};function o(i){var n=t[i];if(void 0!==n)return n.exports;var s=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(s.exports,s,s.exports,o),s.loaded=!0,s.exports}o.amdO={},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=o(343),t=o.n(e);console.log("Testing....."),console.log("Check 100:",t().isNumber(100)),t().isNumber(100,(()=>{console.log("Esto es numero Felicitaciones")}))})()})();
@@ -0,0 +1,6 @@
1
+ /*!!
2
+ * Power Panel pp-is <https://github.com/carlos-sweb/pp-is>
3
+ * @author Carlos Illesca
4
+ * @version 1.2.3 (2024/09/18 15:14 PM)
5
+ * Released under the MIT License
6
+ */
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>pp-is.js - webpack</title>
7
+ <!--<script data-main="main" src="https://requirejs.org/docs/release/2.3.7/minified/require.js"></script>-->
8
+ </head>
9
+ <body>
10
+
11
+ <script type="text/javascript" src="dist/pp-is.app.bundle.js"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,12 @@
1
+ requirejs.config({
2
+ baseUrl:'',
3
+ paths: {
4
+ 'pp-is': 'dist/pp-is',
5
+ }
6
+ });
7
+
8
+ // Start the main app logic.
9
+ requirejs([ 'pp-is' ], function( ppIs ) {
10
+
11
+
12
+ });
@@ -0,0 +1 @@
1
+ import is from './pp-is.js'
@@ -0,0 +1,321 @@
1
+ /*!!
2
+ * Power Panel pp-is <https://github.com/carlos-sweb/pp-is>
3
+ * @author Carlos Illesca
4
+ * @version 1.2.3 (2024/10/06 23:25 PM)
5
+ * Released under the MIT License
6
+ */
7
+ ;(function(){
8
+ "use strict";
9
+ /**
10
+ * @function getType
11
+ * @description - Gets the type name
12
+ * @param {Any} value - Value to check
13
+ * @returns {string}
14
+ * @example
15
+ * const s = 'Hello Word';
16
+ * console.log(getType(s))
17
+ * // [object String]
18
+ */
19
+ const getType=(value)=>Object.prototype.toString.call(value),
20
+ /**
21
+ * @description - This function checks for the presence of `define` in the global scope and checks if it is configured as an AMD module.
22
+ * @function getAMD
23
+ * @return {object} - define object if exists
24
+ */
25
+ getAMD = ()=>typeof define == 'function' && typeof define.amd == 'object' && define.amd,
26
+ /**
27
+ * @function isAMD
28
+ * @description - check if AMD is a Object
29
+ * @return {boolean} - AMD works
30
+ */
31
+ isAMD=()=>isObject(getAMD()),
32
+ /**
33
+ * @function getFreeGlobal
34
+ * @descriptcion - Detect free variable `global`
35
+ * @return {object}
36
+ */
37
+ getFreeGlobal=()=>(typeof global == 'object' && global && global.Object === Object && global),
38
+ /**
39
+ * @function getFreeGlobal
40
+ * @descriptcion - Detect free variable `self`
41
+ * @return {object}
42
+ */
43
+ getFreeSelf=()=>(typeof self == 'object' && self && self.Object === Object && self),
44
+ /**
45
+ * @name getRoot
46
+ * @description - Used as a reference to the global object.
47
+ * @function
48
+ * @return {object}
49
+ */
50
+ getRoot=()=>{
51
+ return getFreeGlobal() || getFreeSelf() || Function('return this')();
52
+ },
53
+ /**
54
+ * @function isFreeExports
55
+ * @description - Detect free variable `exports`
56
+ * @return {boolean} -
57
+ */
58
+ isFreeExports =()=>(typeof exports == 'object' && exports && !exports.nodeType && exports),
59
+ /**
60
+ * @function getFreeModule
61
+ * @description - Detect free variable `module`.
62
+ * @return {object} - variable `module`
63
+ */
64
+ getFreeModule=()=>(isFreeExports() && typeof module == 'object' && module && !module.nodeType && module),
65
+
66
+ /**
67
+ * @function isFreeModule
68
+ * @description - detect if variable module is Object
69
+ * @param { Any } value - Any value
70
+ * @return {boolean}
71
+ */
72
+ isFreeModule=()=>isObject(getFreeModule()),
73
+ /**
74
+ * @function getTypeCompare
75
+ * @description -
76
+ * @param {Any} value - Any Value
77
+ * @param {string} expression - Expression to compare
78
+ *
79
+ */
80
+ getTypeCompare=(value,expression)=>(getType(value) === "[object "+expression+"]"),
81
+ /**
82
+ * @function isNodeList
83
+ * @description - Checks if value is a valid NodeList.
84
+ * @param { Any } value - Any Value
85
+ * @return {boolean}
86
+ */
87
+ isNodeList=(value)=>(typeof NodeList === "undefined" ? false : NodeList.prototype.isPrototypeOf(value)),
88
+ /**
89
+ * @function isHTMLCollection
90
+ * @description - Checks if value is a valid HTMLCollection.
91
+ * @param { Any } value - Any Value
92
+ * @return {boolean}
93
+ */
94
+ isHTMLCollection=(value)=>(typeof HTMLCollection === "undefined" ? false : HTMLCollection.prototype.isPrototypeOf(value)),
95
+ /**
96
+ * @function isArray
97
+ * @description - Checks if value is classified as an Array object.
98
+ * @param { Any } value - Any Value
99
+ * @return {boolean}
100
+ */
101
+ isArray=(value)=>getTypeCompare(value,'Array'),
102
+ /**
103
+ * @function isRegExp
104
+ * @description - Checks if value is a RegExp.
105
+ * @param { Any } value - Any value
106
+ * @return {boolean}
107
+ */
108
+ isRegExp=(value)=>getTypeCompare(value,'RegExp'),
109
+ /**
110
+ * @function isBoolean
111
+ * @description - Checks if value is either true or false.
112
+ * @param { Any } value - Any value
113
+ * @return {boolean}
114
+ */
115
+ isBoolean=(value)=>value === true || value === false || getTypeCompare(value,'Boolean'),
116
+ /**
117
+ * @function isDate
118
+ * @description - isDate
119
+ * @param { Any } value - Any value
120
+ * @return {boolean}
121
+ */
122
+ isDate=(value)=>getTypeCompare(value,'Date'),
123
+ /**
124
+ * @function isElement
125
+ * @description - isElement
126
+ * @param { Any } value - Any value
127
+ * @return {boolean}
128
+ */
129
+ isElement=(value)=>!!( value && value.nodeType === 1 ) ,
130
+ /**
131
+ * @function isFunction
132
+ * @description - Checks if value is a Function.
133
+ * @param { Any } value - Any value
134
+ * @return {boolean}
135
+ */
136
+ isFunction=(value) =>getTypeCompare(value,'Function'),
137
+ /**
138
+ * @function isNull
139
+ * @description - Checks if value is a Null.
140
+ * @param { Any } value - Any value
141
+ * @return {boolean}
142
+ */
143
+ isNull=(value)=>getTypeCompare(value,'Null'),
144
+ /**
145
+ * @function isNumber
146
+ * @description - Checks if value is a Number.
147
+ * @param { Any } value - Any value
148
+ * @return {boolean}
149
+ */
150
+ isNumber=(value)=>getTypeCompare(value,'Number'),
151
+ /**
152
+ * @function isObject
153
+ * @description - Checks if value is classified as an Object.
154
+ * @param { Any } value - Any value
155
+ * @return {boolean}
156
+ */
157
+ isObject=(value)=>getTypeCompare(value,'Object'),
158
+ /**
159
+ * @function isString
160
+ * @description - Checks if value is a string.
161
+ * @param { Any } value - Any value
162
+ * @return {boolean}
163
+ */
164
+ isString=(value)=>getTypeCompare(value,'String'),
165
+ /**
166
+ * @function isUndefined
167
+ * @description - Checks if value is a undefined.
168
+ * @param { Any } value - Any value
169
+ * @return {boolean}
170
+ */
171
+ isUndefined=(value)=>getTypeCompare(value,'Undefined'),
172
+ /**
173
+ * @function isEmpty
174
+ * @description - Checks if value is not empty
175
+ * @param { Any } value - Any value
176
+ * @example
177
+ * // this a empty string
178
+ * is.isEmpty("")
179
+ * // return true
180
+ * @example
181
+ * // this a empty array
182
+ * is.isEmpty([])
183
+ * // return true
184
+ * @example
185
+ * // this a empty Object
186
+ * is.isEmpty({})
187
+ * // return true
188
+ * @return {boolean}
189
+ */
190
+ isEmpty=(value)=>{
191
+ if(isString(value)){return value === ""}
192
+ else if(isArray(value)){return value.length == 0}
193
+ else if(isObject(value)){return Object.keys(value).length === 0}
194
+ return true;
195
+ },
196
+ /**
197
+ * @function isEmail
198
+ * @description - Checks if value is a valid email.
199
+ * @param { Any } value - Any Value
200
+ * @example
201
+ * is.isEmail("h@blog.mydomian.xyz")
202
+ * // return true
203
+ * @return {boolean}
204
+ */
205
+ isEmail = ( value )=>/^([a-z1-9\._-]+)@([a-z0-9-]+\.[a-z]{2,11}|[a-z0-9]+\.[a-z]{2,24}\.[a-z]{2,24})$/i.test( value ),
206
+ /**
207
+ * @function isNaN
208
+ * @description - Checks if value is a valid Number from String.
209
+ * @param { Any } value - Any Value
210
+ * @return {boolean}
211
+ */
212
+ isNaN = ( value )=>(Number.isNaN( parseInt(value))),
213
+ // =======================================================================
214
+ // ^(https?:\/\/)?([w]{3}\.|[w]{3}2\.)? protocol
215
+ // ([w]{3}\.|[w]{3}2\.)? ([a-z\d]+\.)?([a-z\d]+\.[a-z]{2,} Domain name www or www2
216
+ // localhost -> include this word
217
+ // [\d]+\.[\d]+\.[\d]+\.[\d]+ -> add ipv4
218
+ // (\:[\d]+)? -> port
219
+ // ([\??\/?]+[\/;&a-z\d%_.~+=-]*)? -> query url
220
+ // (\#[\/;&a-z\d%_.~+=-]*)? -> hashtag url
221
+ /**
222
+ * @function isUrl
223
+ * @description - Checks if value is a valid Url.
224
+ * @param { Any } value - Any Value
225
+ * @return {boolean}
226
+ */
227
+ isUrl = ( value )=>/^(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(value),
228
+
229
+ // =======================================================================
230
+ /**
231
+ * @function baseSanetize
232
+ * @description - Trabajar Aqui
233
+ * @param { function } doneOrReject - Custom function that is triggered when the positive hook or negative hook is defined by the user. This function can resolve true or false independent of the first evaluation or it can simply do nothing.
234
+ * @param { Any } value - The value to evaluate
235
+ * @param { boolean } evaluate - pre evaulate from static function isString,isUndefined,..etc
236
+ * @return { boolean } - evaluate
237
+ */
238
+ baseSanetize = ( doneOrReject , value , evaluate )=> {
239
+ const response = doneOrReject(value);
240
+ return isBoolean( response ) ? response : evaluate;
241
+ },
242
+ /**
243
+ * @function baseEvaluate
244
+ * @description - Responsible for evaluation
245
+ * @param {function} func - Evaluative function
246
+ * @param {Any} value - The value to evaluate
247
+ * @param {function} done - Function to be executed in case the evaluation is positive.
248
+ * @param {function} reject - Function to be executed in case the evaluation is negative.
249
+ * @return {boolean} - value of the evaluation
250
+ */
251
+ baseEvaluate = (func , value , done , reject) => {
252
+ const evaluate = func(value);
253
+ return evaluate ? isFunction( done ) ? baseSanetize(done,value,evaluate) : true : isFunction( reject ) ? baseSanetize(reject,value,evaluate) : false ;
254
+ },
255
+ /**
256
+ * @function base
257
+ * @description - This function stretches to baseEvaluate passing as parameter the function that specifically evaluates the given value to be evaluated, but in the baseEvaluate function it arrives as a parameter called func
258
+ * @param {function} func - Evaluative function
259
+ * @return {function} - function to execute baseEvaluate
260
+ * @example
261
+ * const hello = "hello Word!";
262
+ * const evaluate = base(isString)(hello)
263
+ * //return true
264
+ */
265
+ base = ( func ) => ( value ,done , reject) => baseEvaluate( func , value , done , reject),
266
+ /**
267
+ * @description - Obtains the object to be exported with the following main functions
268
+ * @name is
269
+ * @type {object}
270
+ * @property {function} isArray - {@link isArray}
271
+ * @property {function} isBoolean - {@link isBoolean}
272
+ * @property {function} isDate - {@link isDate}
273
+ * @property {function} isElement - {@link isElement}
274
+ * @property {function} isEmpty - {@link isEmpty}
275
+ * @property {function} isFunction - {@link isFunction}
276
+ * @property {function} isNull - {@link isNull}
277
+ * @property {function} isNumber - {@link isNumber}
278
+ * @property {function} isString - {@link isString}
279
+ * @property {function} isUndefined - {@link isUndefined}
280
+ * @property {function} isEmail - {@link isEmail}
281
+ * @property {function} isNaN - {@link isNaN}
282
+ * @property {function} isRegExp - {@link isRegExp}
283
+ * @property {function} isUrl - {@link isUrl}
284
+ * @property {function} isNodeList - {@link isNodeList}
285
+ * @property {function} isHTMLCollection - {@link isHTMLCollection}
286
+ * @property {function} isAMD - {@link isAMD}
287
+ * @property {function} isFreeModule - {@link isFreeModule}
288
+ * @property {function} getRoot - {@link getRoot}
289
+ */
290
+ is = {
291
+ 'isArray':base(isArray),
292
+ 'isBoolean':base(isBoolean),
293
+ 'isDate':base(isDate),
294
+ 'isElement':base(isElement),
295
+ 'isEmpty':base(isEmpty),
296
+ 'isFunction':base(isFunction),
297
+ 'isNull':base(isNull),
298
+ 'isNumber':base(isNumber),
299
+ 'isObject':base(isObject),
300
+ 'isString':base(isString),
301
+ 'isUndefined':base(isUndefined),
302
+ 'isEmail':base(isEmail),
303
+ 'isNaN':base(isNaN),
304
+ 'isRegExp':base(isRegExp),
305
+ 'isUrl':base(isUrl),
306
+ 'isNodeList':base(isNodeList),
307
+ 'isHTMLCollection':base(isHTMLCollection),
308
+ 'isAMD':base(isAMD),
309
+ 'isFreeModule':base(isFreeModule),
310
+ 'getRoot':getRoot
311
+ }
312
+
313
+
314
+ //
315
+ is.isAMD(null,()=>{define(()=>is)},()=>{
316
+ is.isFreeModule(null,()=>{ module.exports = is; },()=>{
317
+ is.getRoot().ppIs = is
318
+ })
319
+ });
320
+
321
+ }.call(this))
package/pp-is.js DELETED
@@ -1,97 +0,0 @@
1
- /*!!
2
- * Power Panel pp-is <https://github.com/carlos-sweb/pp-is>
3
- * @author Carlos Illesca
4
- * @version 1.2.0 (2024/02/26 15:00 PM)
5
- * Released under the MIT License
6
- */
7
- (function(global,factory){
8
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
9
- typeof define === 'function' && define.amd ? define('ppIs', factory) :
10
- (global = global || self, (function () {
11
- var exports = global.ppIs = factory();
12
- }()
13
- ));
14
- })(this,function(){
15
- // =======================================================================
16
- function getType( value ){ return Object.prototype.toString.call(value) }
17
- // =======================================================================
18
- function isNodeList( value ){ return NodeList.prototype.isPrototypeOf(value) }
19
- // =======================================================================
20
- function isHTMLCollection( value ){ return HTMLCollection.prototype.isPrototypeOf(value) }
21
- // =======================================================================
22
- function isArray ( value ){ return getType( value ) === '[object Array]'}
23
- // =======================================================================
24
- function isRegExp ( value ){ return getType( value ) === '[object RegExp]'}
25
- // =======================================================================
26
- function isBoolean( value ){ return value === true || value === false || getType( value ) === '[object Boolean]'};
27
- // =======================================================================
28
- function isDate( value ){ return getType( value ) === '[object Date]'}
29
- // =======================================================================
30
- function isElement( value ){ return !!( value && value.nodeType === 1 ) }
31
- // =======================================================================
32
- function isFunction( value ) { return getType( value ) === '[object Function]'}
33
- // =======================================================================
34
- function isNull( value ){ return getType( value ) === '[object Null]'}
35
- // =======================================================================
36
- function isNumber( value ){ return getType( value ) === '[object Number]'}
37
- // =======================================================================
38
- function isObject( value ){ return getType( value ) === '[object Object]'}
39
- // =======================================================================
40
- function isString( value ){ return getType( value ) === '[object String]'}
41
- // =======================================================================
42
- function isUndefined( value ){ return getType( value ) === '[object Undefined]'}
43
- // =======================================================================
44
- function isEmpty( value ){
45
- if(isString(value)){ return value === ""; }
46
- if(isArray(value) ){ return value.length == 0; }
47
- if(isObject(value) ){ return Object.keys(value).length === 0;}
48
- return true;
49
- }
50
- // =======================================================================
51
- // Investigar Sobre los dominios de cada pais y de cada segmento comercial o publico personal
52
- function isEmail( value ){ 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( value )}
53
- // =======================================================================
54
- function isNaN( value ){ return Number.isNaN( parseInt(value) )}
55
- // =======================================================================
56
- // ^(https?:\/\/)?([w]{3}\.|[w]{3}2\.)? protocol
57
- // ([w]{3}\.|[w]{3}2\.)? ([a-z\d]+\.)?([a-z\d]+\.[a-z]{2,} Domain name www or www2
58
- // localhost -> include this word
59
- // [\d]+\.[\d]+\.[\d]+\.[\d]+ -> add ipv4
60
- // (\:[\d]+)? -> port
61
- // ([\??\/?]+[\/;&a-z\d%_.~+=-]*)? -> query url
62
- // (\#[\/;&a-z\d%_.~+=-]*)? -> hashtag url
63
- function isUrl( value ){ 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(value)}
64
- // =======================================================================
65
- var base = function( func ){
66
- // Retornamos una funcion
67
- return function( value , done ){
68
- if( isFunction( done ) ){
69
- if( func( value ) ){
70
- return done( value )
71
- }
72
- }else{
73
- return func(value)
74
- }
75
- }
76
- }
77
- // =======================================================================
78
- return {
79
- 'isArray':base(isArray),
80
- 'isBoolean':base(isBoolean),
81
- 'isDate':base(isDate),
82
- 'isElement':base(isElement),
83
- 'isEmpty':base(isEmpty),
84
- 'isFunction':base(isFunction),
85
- 'isNull':base(isNull),
86
- 'isNumber':base(isNumber),
87
- 'isObject':base(isObject),
88
- 'isString':base(isString),
89
- 'isUndefined':base(isUndefined),
90
- 'isEmail':base(isEmail),
91
- 'isNaN':base(isNaN),
92
- 'isRegExp':base(isRegExp),
93
- 'isUrl':base(isUrl),
94
- 'isNodeList':base(isNodeList),
95
- 'isHTMLCollection':base(isHTMLCollection)
96
- }
97
- })
package/pp-is.min.js DELETED
@@ -1 +0,0 @@
1
- !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define("ppIs",n):(t=t||self).ppIs=n()}(this,(function(){function t(t){return Object.prototype.toString.call(t)}function n(n){return"[object Array]"===t(n)}function e(n){return"[object Function]"===t(n)}function o(n){return"[object Object]"===t(n)}function i(n){return"[object String]"===t(n)}var r=function(t){return function(n,o){return e(o)?t(n)?o(n):void 0:t(n)}};return{isArray:r(n),isBoolean:r((function(n){return!0===n||!1===n||"[object Boolean]"===t(n)})),isDate:r((function(n){return"[object Date]"===t(n)})),isElement:r((function(t){return!(!t||1!==t.nodeType)})),isEmpty:r((function(t){return i(t)?""===t:n(t)?0==t.length:!o(t)||0===Object.keys(t).length})),isFunction:r(e),isNull:r((function(n){return"[object Null]"===t(n)})),isNumber:r((function(n){return"[object Number]"===t(n)})),isObject:r(o),isString:r(i),isUndefined:r((function(n){return"[object Undefined]"===t(n)})),isEmail:r((function(t){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(t)})),isNaN:r((function(t){return Number.isNaN(parseInt(t))})),isRegExp:r((function(n){return"[object RegExp]"===t(n)})),isUrl:r((function(t){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(t)})),isNodeList:r((function(t){return NodeList.prototype.isPrototypeOf(t)})),isHTMLCollection:r((function(t){return HTMLCollection.prototype.isPrototypeOf(t)}))}}));