0.0.13 • Published 7 months ago
sc-jslib v0.0.13
sc-jslib
sc-jslib is simple javascript library contains three types of modules,
- check module: this module has the commonn check functions that use to check if the value or objeact is match the certain data-type or specific value, and these functions are:
- isUndefined: check if the value is undifined
- isNull: check if the value is Null
- isString: check if the value is String
- isArray: check if the value is Array
- isObject: check if the value is Object
- isBoolean: check if the value is Boolean
- isFunction: check if the value is Function
- isNumber: check if the value is Number
- isDate: check if the value is Date
- isMap: check if the value is Map
- isSet: check if the value is Set
- isEmpty: check if the value is Empty
- isEmptyObject: check if the value is Empty Object
- isBlank: check if the value is Blank
- isTelephoneNumber: check if the value is Telephone Number
- isEmail: check if the value is Email
- isValidDomain: check if the value is Valid Domain
- validation module: this module has the common validation functions that use to validate value, in-case the value invalid the error exception will throw so should used try catch, and these functions are:
- validateNotNullValue: validate the value is not null.
- validateNotBlnkValue: validate the value is not blank.
- validateLengthMatch: validate the value length match the provided length.
- validateLengthNotGreater: validate the value length less than or equal the provided length.
- validateLengthNotLess: validate the value length grater than or equal the provided length.
- validateLengthBetween: validate the value length between the provided minLength and maxLength.
- common module: this module has the common or un-grouped functions, and these functions are:
- getRandomInt: generate random number, the max value can be provided as max variable.
- getReactElementTage: return the react element tag name or null.