@mitchell-sung/functions
v1.0.3
Published
Shared functions for MitchellApps by Mitchell Sung
Downloads
7
Readme
@mitchell-sung/functions
The @mitchell-sung/functions library provides developers with an all-encompassing suite of functions.
Installation
npm install @mitchell-sung/functions
Basic Usage
import { validateUsername } from '@mitchell-sung/functions';
const func_name = () => {
const inputUsername = '[email protected]';
const res = validateUsername(inputUsername);
console.log('hasError :>> ', res.hasError); // true or false
console.log('errorMessage :>> ', res.errorMessage); // "Error messages..."
};
var { VALID_MSG } = require('@mitchell-sung/functions');
function func_name() {
console.log(VALID_MSG.SELECTOR_REQUIRED);
// Result : "At least one option must be selected."
}