# okay-string

> Play with the numerous methods with a single line of code.

Latest version **0.1.10** (published 2017-12-06) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install okay-string
pnpm add okay-string
yarn add okay-string
bun add okay-string
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.10 |
| Published | 2017-12-06 |
| First published | 2017-12-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Idrees Dargahwala |
| Maintainers | theiyd |
| Keywords | validation, String, validate, assert |

## Links

- npm: https://www.npmjs.com/package/okay-string
- Repository: https://github.com/theIYD/okay-string
- Homepage: https://github.com/theIYD/okay-string#readme
- Issues: https://github.com/theIYD/okay-string/issues
- npm.io page: https://npm.io/package/okay-string

## Alternatives

- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads
- [@oridune/validator](https://npm.io/package/@oridune/validator.md) — 16 weekly downloads

## Recent versions

- 0.1.10 (latest) — 2017-12-06
- 0.1.9 — 2017-12-06
- 0.1.8 — 2017-12-06
- 0.1.7 — 2017-12-06
- 0.1.6 — 2017-12-06
- 0.1.5 — 2017-12-05
- 0.1.4 — 2017-12-05
- 0.1.3 — 2017-12-05
- 0.1.2 — 2017-12-05
- 0.1.1 — 2017-12-05
- 0.1.0 — 2017-12-05

## README

# ![Okay String](https://github.com/theIYD/okay-string/blob/master/media/okaystringcover.png)
[![Build Status](https://travis-ci.com/theIYD/okay-string.svg?token=23UFR4t3ymPecq1qZHfG&branch=master)](https://travis-ci.com/theIYD/okay-string) [![NPM version](https://img.shields.io/npm/v/okay-string.svg)](https://www.npmjs.com/package/okay-string) [![npm](https://img.shields.io/npm/dw/okay-string.svg)](https://www.npmjs.com/package/okay-string) [![npm](https://img.shields.io/npm/l/okay-string.svg)](https://github.com/theIYD/okay-string/blob/master/LICENSE) 

> 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
```js

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](https://github.com/theIYD/okay-string/blob/master/LICENSE)

### Author
This project is made with ❤️ by [Idrees Dargahwala](https://theiyd.github.io/theidrees.me)

---
_Source: https://npm.io/package/okay-string · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
