# separate-by-character

> "Separates the values in a string by a character given by the user, by default it is separated by commas, and returns a list with the values. Gets rid of the specified character and the first space after each element. If two of the specified character are

Latest version **1.1.0** (published 2020-10-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install separate-by-character
pnpm add separate-by-character
yarn add separate-by-character
bun add separate-by-character
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2020-10-29 |
| First published | 2020-10-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Osbaldo Martinez |
| Maintainers | osbaldoiniguez |
| Keywords | separate, combine, combine by character, separate by character |

## Links

- npm: https://www.npmjs.com/package/separate-by-character
- Repository: https://github.com/osbaldomartinez20/Separate-By-Character
- Homepage: https://github.com/osbaldomartinez20/Separate-By-Character#readme
- Issues: https://github.com/osbaldomartinez20/Separate-By-Character/issues
- npm.io page: https://npm.io/package/separate-by-character

## Recent versions

- 1.1.0 (latest) — 2020-10-29
- 1.0.0 — 2020-10-29

## README

# Separate-By-Character

Separates the values in a string by a character given by the user, by default it is separated by commas, and returns a list with the values. Gets rid of the specified character and the first space after each element. If two of the specified character are in a row that means a value of ''.

## Examples

const separate = require('separate-by-character');

let first = 'hello, my good, friend.'

let firstTest = separate.separateByCharacter(first);

//firstTest = [ 'hello', 'my good', 'friend' ]

let second = 'I do not know. Maybe I know.. Hello.';

let secondTest = separate.separateByCharacter(second, '.');

//secondTest = [ 'I do not know', 'Maybe I know', '', 'Hello' ]

let third = 'I love;; semicolons;;';

let thirdTest = separate.separateByCharacter(third, ';;');

//Because the paramater for character has a length longer than 1, it defaults to ',', So thirdTest = [ 'I love;; semicolons;;' ]

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