npm.io
0.1.10 • Published 8 years ago

okay-string

Licence
MIT
Version
0.1.10
Deps
0
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Okay String

Build Status NPM version npm npm

Play with Strings easily.

This package contains numerous methods which can be used anywhere in your application according to your need by writing a single line of code.

Install


$ npm install --save okay-string

Usage


const okayString = require('okay-string');

console.log(okayString.isPalindrome('bob'));
//=> true

console.log(okayString.isItAnIPAddress('hello world'));
//=> false

.... and other methods are mentioned below:

Methods

Method Name Description Return type
isItEmpty(str) Check if the string is empty boolean
isItBool(str) Check if string is true or false boolean
isItStartWithLowerCase(str) Check if string starts with a lowercase letter boolean
isItAnIPAddress(address) Check if entered address is an IP address boolean
isItAPalindrome(str) Check if string is palindrome boolean
isAlphabetic(str) Check if string contains all alphabets boolean
isASCII(str) Check if string contains ASCII characters boolean
parseDate(str) Check if if date is in correct format i.e DD/MM/YYYY boolean
equals(str, elem) Check if both the entered strings are same boolean
isHexColor(str) Check if string is a hex color boolean
isItBase64(str) Check if string is base64 encoded boolean
isMD5(str) Check if string is valid MD5 boolean
Method Name Description Return type
getShuffledArray(arr) Get an array shuffled array
getFactorial(n) Get factorial of a number number
getGCD(numb1, numb2) Get GCD among the two numbers number
getRandomNumber(min, max) Get random number between min & max number
License

The project is licensed under the MIT License

Author

This project is made with by Idrees Dargahwala

Keywords