map-char
v1.0.5
Published
The mapChar() function iterates over each character of the string and executes the provided callback function for each one.
Downloads
41
Readme
mapChar
Description
The mapChar() function iterates over each character of the string and executes the provided callback function for each one.
Install
npm i map-charImport
require('map-char');Usage
const str = 'test'
str.mapChar((char, i) => {
console.log(char, i);
})