@ibi-dev/valid-check 1.0.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/README.md +37 -0
- package/package.json +24 -0
- package/src/index.js +9 -0
- package/src/isValidElement.js +5 -0
- package/src/isValidNumber.js +5 -0
- package/src/isValidString.js +5 -0
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# valid-check
|
|
2
|
+
|
|
3
|
+
Lightweight, dependency-free validation helpers for JavaScript and React Native applications.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install valid-check
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```javascript
|
|
14
|
+
import { isValidString, isValidNumber, isValidElement } from "validation-check";
|
|
15
|
+
|
|
16
|
+
console.log(isValidString("Hello"));
|
|
17
|
+
console.log(isValidNumber(123));
|
|
18
|
+
console.log(isValidElement("test"));
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Functions
|
|
22
|
+
|
|
23
|
+
### isValidString
|
|
24
|
+
|
|
25
|
+
Checks whether a value is a non-empty string.
|
|
26
|
+
|
|
27
|
+
### isValidNumber
|
|
28
|
+
|
|
29
|
+
Checks whether a value is a valid number.
|
|
30
|
+
|
|
31
|
+
### isValidElement
|
|
32
|
+
|
|
33
|
+
Checks whether a value is not null, undefined.
|
|
34
|
+
|
|
35
|
+
## License
|
|
36
|
+
|
|
37
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ibi-dev/valid-check",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Valid-check/Validation-check: Lightweight, dependency-free validation helpers for strings, numbers, and elements.",
|
|
5
|
+
"main": "src/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"src"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"validation",
|
|
14
|
+
"validator",
|
|
15
|
+
"isvalid",
|
|
16
|
+
"string",
|
|
17
|
+
"number",
|
|
18
|
+
"element",
|
|
19
|
+
"utils",
|
|
20
|
+
"checker"
|
|
21
|
+
],
|
|
22
|
+
"author": "mohammedibrahimfazal@gmail.com",
|
|
23
|
+
"license": "MIT"
|
|
24
|
+
}
|
package/src/index.js
ADDED