2.0.2 • Published 12 months ago

@hugoalh/concatenate v2.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Concatenate (NodeJS)

License GitHub Repository GitHub Stars GitHub Contributors GitHub Issues GitHub Pull Requests GitHub Discussions CodeFactor Grade

ReleasesLatest (GitHub Latest Release Date)Pre (GitHub Latest Pre-Release Date)
GitHub GitHub Total DownloadsGitHub Latest Release VersionGitHub Latest Pre-Release Version
NPM NPM Total DownloadsNPM Latest Release VersionNPM Latest Pre-Release Version

📝 Description

A NodeJS module to concatenate multiple items into one item.

This project is separated from @hugoalh/more-method's (GitHub)(NPM) function concatenate.

📚 Documentation

Getting Started

  • NodeJS ^ v12.20.0 || ^ v14.15.0 || >= v16.13.0
npm install @hugoalh/concatenate
import concatenate from "@hugoalh/concatenate";// Default Import

API

Function

concatenate<T>(...items: T[][]): T[];
concatenate<K, V>(...items: Map<K, V>[]): Map<K, V>;
concatenate<T>(...items: { [x: string]: T; }[]): { [x: string]: T; };
concatenate<T>(...items: Set<T>[]): Set<T>;
concatenate(...items: string[]): string;

Example

concatenate(["one", "two", "three"], ["four", "five", "six"]);
//=> ["one", "two", "three", "four", "five", "six"]
concatenate({ foo: "bar" }, { loo: "too" });
//=> { foo: "bar", loo: "too" }
concatenate({ foo: { bar: { baz: 1 }}}, { foo: { bar: { boo: 2 }}});
//=> { foo: { bar: { baz: 1, boo: 2 }}}
2.0.2

12 months ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago