🧩 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.
npm install map-join
# or
yarn add map-join
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>"
- Lightweight – zero dependencies
- Clean & readable – combines mapping and joining in one line
- Reusable – works for various string formatting needs
- Safe – includes basic input validation
MIT License © Aman Pareek