# lamed_string

> String functions

Latest version **1.11.18** (published 2020-01-17) · MIT license · 0 weekly downloads

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

## Install

```sh
npm install lamed_string
pnpm add lamed_string
yarn add lamed_string
bun add lamed_string
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.11.18 |
| Published | 2020-01-17 |
| First published | 2019-04-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 107 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Perez Lamed van Niekerk |
| Maintainers | perezlamed |

## Links

- npm: https://www.npmjs.com/package/lamed_string
- Repository: https://github.com/perezLamed/lamed_string
- Homepage: https://github.com/perezLamed/lamed_string#readme
- Issues: https://github.com/perezLamed/lamed_string/issues
- npm.io page: https://npm.io/package/lamed_string

## Dependencies (5)

- [chalk](https://npm.io/package/chalk.md) 3.0.0
- [io_format](https://npm.io/package/io_format.md) ^1.2.9
- [lamed_core](https://npm.io/package/lamed_core.md) ^1.8.22
- [lamed_test](https://npm.io/package/lamed_test.md) ^2.11.26
- [ltype_boolean](https://npm.io/package/ltype_boolean.md) ^0.0.7

## Recent versions

- 1.11.18 (latest) — 2020-01-17
- 1.11.17 — 2020-01-17
- 1.11.16 — 2020-01-17
- 1.11.15 — 2020-01-16
- 1.11.14 — 2020-01-16
- 1.11.13 — 2020-01-15
- 1.11.12 — 2020-01-11
- 1.11.11 — 2020-01-07
- 1.11.10 — 2020-01-07
- 1.11.9 — 2020-01-04
- 1.11.8 — 2020-01-04
- 1.11.7 — 2020-01-04
- 1.11.6 — 2019-12-29
- 1.11.5 — 2019-12-29
- 1.11.4 — 2019-12-29
- … 99 more at https://npm.io/package/lamed_string/versions

## README

# lamed_string

>**AS A** <u>"JavaScript developer"</u>
**I WANT TO HAVE** <u>"I want to manage string function in one place"</u>
**SO THAT I CAN** <u>"reap the benefit in all projects"</u>

Part of [See it Done](https://github.com/perezLamed/see_it_done)

[![npm](https://img.shields.io/npm/v/lamed_string.svg)](https://www.npmjs.org/package/lamed_string)
[![downloads](http://img.shields.io/npm/dt/lamed_string.svg?style=flat)](https://www.npmjs.org/package/lamed_string)
[![Build Status](https://travis-ci.org/perezLamed/lamed_string.svg?branch=master)](https://travis-ci.org/perezLamed/lamed_string)
[![codecov](https://codecov.io/gh/perezLamed/lamed_string/branch/master/graph/badge.svg)](https://codecov.io/gh/perezLamed/lamed_string)
[![CodeFactor](https://www.codefactor.io/repository/github/perezlamed/lamed_string/badge)](https://www.codefactor.io/repository/github/perezlamed/lamed_string)
[![Code size](https://img.shields.io/github/languages/code-size/perezLamed/lamed_string.svg?style=flat)](https://github.com/perezLamed/lamed_string)
[![license](https://img.shields.io/github/license/perezLamed/lamed_string.svg?style=flat)](https://github.com/perezLamed/lamed_string)

[![NPM](https://nodei.co/npm/lamed_string.png?downloads=true&downloadRank=true)](https://nodei.co/npm/lamed_string/)

[![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard)

## Install
### [npm](https://www.npmjs.com/package/lamed_string)
`npm i lamed_string -s`

### yarn
`yarn add lamed_string`

## Usage
### Node
```
const _lstring = require('lamed_string');
```

- [Function documentation](doc/functions.md)

## Array Functions

| Functions | Description |
| ----- | -----|
| [Array.**replaceAll**(find, replace)](#replaceAll) | Replace all occurrences of a string in an array. 
| [Array.**toLowerCase**()](#toLowerCase)            | Change array elements to lower case.
| [Array.**toUpperCase**()](#toUpperCase)          | Change array elements to upper case.
| Array.**includesAny**('???')                      | Removes all occurrences of a set of strings in an array
| Array.**removeAny**(Array)                        | Removes all occurrences of a set of strings in an array
  
 ## Other functions 
| Functions | Description |
| ----- | -----|
| ['???'.**includeAll**(???)](#includeAll)         | Test if all argument items are included in String. If argument is array, the array items will be used.
| ['???'.**includeAny**(???)](#includeAny)         |Test if any argument items are included in String. If argument is array, the array items will be used.
| '???'.**replaceAll**(find, replace)                            | Replace all occurrences of a string
| Date.**toStr**('/')                                | Outputs the date as yyyy/mm/dd
| [**substring_BetweenChars**(str, strStart, strEnd)](#substring_BetweenChars) | Returns from **str** the string between **srtStat** and **strEnd**. 
  **object2Str**(object, format = false) | Convert object to string; **@param format** - if true then format the object string

  
## Description

<a name = "replaceAll"></a>
### '???'.replaceAll(find, replace)
- Replace all occurrences of a string in an array.

| Parameter | Description |
|-----------|-------------|
| find | The string to search for
| replace | The string to replace all occurances with
 
`'hello, there, my, pet.'.replaceAll(',', '');   // hello there my pet.`
 
----

<a name = "toLowerCase"></a>
### '???'.toLowerCase()
- Change array elements to lower case.

`'HELLO, THERE, MY, PET.'.toLowerCase(',', '');   // hello, there, my, pet.` 

----

<a name = "toUpperCase"></a>
### '???'.toUpperCase()
- Change array elements to upper case.

`'hello, there, my, pet.'.toUpperCase(',', '');   // HELLO, THERE, MY, PET.` 

----

<a name = "includeAll"></a>
### '???'.includeAll()
- Test if all argument items are included in String. If argument is array, the array items will be used.

```js
    /* string parameter */
    "absdefg_aa_bb".includesAll();                  //false
    "absdefg_aa_bb".includesAll('');                //true  - This is useful when search items are not provided
    "absdefg_aa_bb".includesAll(undefined);         //false
    "absdefg_aa_bb".includesAll(null);              //false
    "absdefg_aa_bb".includesAll('a');               //true
    "absdefg_aa_bb".includesAll('a', 'z');          //false
    "absdefg_aa_bb".includesAll('a', 'aa');         //true
    "absdefg_aa_bb".includesAll('a', 'aa', 'bb');   //true
    
    /* array parameter */
    "absdefg_aa_bb".includesAll(['a', 'aa', 'bb']);         //true
    "absdefg_aa_bb".includesAll(['a', 'aa', 'bb', '']);     //true
    "absdefg_aa_bb".includesAll(['a', 'aa', 'bb', 'dd']);   //false
``` 


<a name = "includeAny"></a>
### '???'.includeAny()
- Test if any argument items are included in String. If argument is array, the array items will be used.

```js
     /* string parameter */   
    "absdefg_aa_bb".includesAny();                      //false
    "absdefg_aa_bb".includesAny('');                    //false
    "absdefg_aa_bb".includesAny(undefined);             //false
    "absdefg_aa_bb".includesAny(null);                  //false
    "absdefg_aa_bb".includesAny('a');                   //true
    "absdefg_aa_bb".includesAny('a', 'z');              //true
    "absdefg_aa_bb".includesAny('a', 'aa');             //true
    "absdefg_aa_bb".includesAny('a', 'aa', 'bb', 'g');  //true
    "absdefg_aa_bb".includesAny('z');                   //false
    "absdefg_aa_bb".includesAny(' ');                   //false
    'ROUTE'.includesAny(' ', '{', ';', '/', ':', '.');  //false
    
    /* array parameter */
    "absdefg_aa_bb".includesAny(['a', 'aa', 'bb', 'g']);        //true
    "absdefg_aa_bb".includesAny(['a1', 'aa1', 'bb1', 'g']);     //true
    "absdefg_aa_bb".includesAny(['a1', 'aa1', 'bb1', 'g1']);    //false
````

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