0.1.10 • Published 6 years ago

okay-string v0.1.10

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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 NameDescriptionReturn type
isItEmpty(str)Check if the string is emptyboolean
isItBool(str)Check if string is true or falseboolean
isItStartWithLowerCase(str)Check if string starts with a lowercase letterboolean
isItAnIPAddress(address)Check if entered address is an IP addressboolean
isItAPalindrome(str)Check if string is palindromeboolean
isAlphabetic(str)Check if string contains all alphabetsboolean
isASCII(str)Check if string contains ASCII charactersboolean
parseDate(str)Check if if date is in correct format i.e DD/MM/YYYYboolean
equals(str, elem)Check if both the entered strings are sameboolean
isHexColor(str)Check if string is a hex colorboolean
isItBase64(str)Check if string is base64 encodedboolean
isMD5(str)Check if string is valid MD5boolean
isAnEmail(str)Check if string is a valid emailboolean
isItIncludes(str, sub)Check if string contains the substringboolean
isIMEI(number)Check if number is valid IMEIboolean
isMACAddr(str)Check if string is valid MAC Addressboolean
isDataURI(str)Check if string is a data uriboolean
Method NameDescriptionReturn type
getShuffledArray(arr)Get an array shuffledarray
getFactorial(n)Get factorial of a numbernumber
getGCD(numb1, numb2)Get GCD among the two numbersnumber
getRandomNumber(min, max)Get random number between min & maxnumber

License

The project is licensed under the MIT License

Author

This project is made with ❤️ by Idrees Dargahwala

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago