# jsmp-infra-wecreus

> jsmp dummy

Latest version **1.0.7** (published 2021-02-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install jsmp-infra-wecreus
pnpm add jsmp-infra-wecreus
yarn add jsmp-infra-wecreus
bun add jsmp-infra-wecreus
```

## 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.0.7 |
| Published | 2021-02-09 |
| First published | 2021-02-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Danylo Riabchuk |
| Maintainers | wecreus |

## Links

- npm: https://www.npmjs.com/package/jsmp-infra-wecreus
- npm.io page: https://npm.io/package/jsmp-infra-wecreus

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.17.20

## Recent versions

- 1.0.7 (latest) — 2021-02-09
- 1.0.6 — 2021-02-01
- 1.0.5 — 2021-02-01
- 1.0.4 — 2021-02-01
- 1.0.3 — 2021-02-01
- 1.0.2 — 2021-02-01
- 1.0.1 — 2021-02-01
- 1.0.0 — 2021-02-01

## README

This is a dummy npm package for training purposes.

## Features

- Split array into chunks with specified length.

- Replace any character or sequence of characters in a string.

## Installation

Install via [Node.js](http://nodejs.org):

```bash
$ npm install jsmp-infra-wecreus
```

Import as Node.js module:

```js
const { splitArray, stringReplace } = require('jsmp-infra-wecreus');
```

## Use

```js
splitArray(array, size, [preserve = true]);
```

Function returns an array of elements split into groups the length of `size`
`Preserve` indicates if uneven chunk should be included in the result. Defaults to `true`;

Example:

```js
const resultPreserve = splitArray(["sample1", "sample2", "sample3", "sample4", "sample5"], 2);     // [["sample1", "sample2"], ["sample3", "sample4"], ["sample5"]]
const result = splitArray(["sample1", "sample2", "sample3", "sample4", "sample5"], 2, false);      // [["sample1", "sample2"], ["sample3", "sample4"]]
```

```js
stringReplace(string, stringToReplace, [replacement = '']);
```

Function replaces `stringToReplace` found in `string` with `replacement`

Example:

```js
const result = stringReplace('test', 'es');                     // "tt"
const resultReplace = stringReplace('test', 'st', 'sting');     // "testing"
```

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