0.1.1 • Published 4 years ago
@torigoedesign/utils v0.1.1
README
Utility library
Installation
Using yarn:
yarn add @torigoedesign/utils
Using npm:
npm install @torigoedesign/utils
Documentation
Examples
kebab-case to camelCase
import { kebabCaseToCamelCase } from "@torigoedesign/utils";
kebabCaseToCamelCase("set-user-name"); // setUserName
camelCase to kebab-case
import { camelCaseToKebabCase } from "@torigoedesign/utils";
camelCaseToKebabCase("setUserName"); // set-user-name
Email address validation
import { isEmail } from "@torigoedesign/utils";
isEmail("example@example.com"); // true
isEmail("example@exam@ple.com"); // false
IPv4 address validation
import { isIPv4 } from "@torigoedesign/utils";
isIPv4("255.255.255.255"); // true
isIPv4("255.255.255.256"); // false
See the docs for other functions.
License
The MIT License