Help build your app faster
npm install --save @asepsetyawan/js-common-utils
import React, { Component } from 'react'
import { isEmail } from '@asepsetyawan/js-common-utils'
class Example extends Component {
render () {
return (
{isEmail("[email protected]") ? "Valid Email" : "Invalid Email"}
)
}
}
Utils |
Description |
---|---|
isEmail |
Validate valid email, isEmail() |
isNumber |
Validate number isNumber() |
formatCurrency |
Format number as currency formatCurrency(2000) - result 2.000 |
isObject |
Return boolean {'a': 'string'} |
sum |
return total number in array sum([10, 20]) - result 30 |
MIT © asepsetyawan