@asepsetyawan/js-common-utils
v1.0.1
Published
Common utils to help build your app faster
Downloads
6
Readme
common-utils
Help build your app faster
Install
npm install --save common-utils
Usage
import React, { Component } from 'react'
import { isEmail } from 'common-utils'
class Example extends Component {
render () {
return (
{isEmail("[email protected]") ? "Valid Email" : "Invalid Email"}
)
}
}
Utils
| 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 |
License
MIT © asepsetyawan