@extra-string/from.min

Create string from iterable, like Array.from(). > This is part of package [extra-string].

Usage no npm install needed!

<script type="module">
  import extraStringFromMin from 'https://cdn.skypack.dev/@extra-string/from.min';
</script>

README

Create string from iterable, like Array.from().

This is part of package extra-string.

This is browserified, minified version of @extra-string/from.
It is exported as global variable string_from.
CDN: unpkg, jsDelivr.

const from = require('@extra-string/from');
// from(<iterable>, [mapFn], [thisArg])

from(['a', 'b']);
// 'ab'
from('abc', (v) => String.fromCharCode(v.charCodeAt()+1));
// 'bcd'
from(new Set().add('a').add('b'));
// 'ab'
from(new Map().set('a', 1).set('b', 2));
// 'a,1b,2'

extra-string