map-join
v1.0.0
Published
Utility to map over an array and join the result into a single string.
Readme
map-join
🧩 A tiny utility that maps over an array and joins the results into a single string. Perfect for rendering HTML lists, CSVs, or custom string formats.
📦 Installation
npm install map-join
# or
yarn add map-join🚀 Usage
const mapJoin = require('map-join');
const items = [1, 2, 3];
const html = mapJoin(items, (item) => `<li>${item}</li>`);
console.log(html);
// Output: "<li>1</li><li>2</li><li>3</li>"💡 Why Use map-join?
- Lightweight – zero dependencies
- Clean & readable – combines mapping and joining in one line
- Reusable – works for various string formatting needs
- Safe – includes basic input validation
📄 License
MIT License © Aman Pareek
