Nothing's plumb meaningless

    @extra-string/reduce-right

    1.1.3 • Public • Published

    Reduce characters to a string from right, like Array.reduceRight().

    const reduceRight = require('@extra-string/reduce-right');
    // reduceRight(<string>, <reduceFn>, [initialValue])
    
    reduceRight('abc', (acc, v) => acc+v);
    // 'cba'
    reduceRight('123', (acc, v) => acc+v, '-');
    // '-321'
    reduceRight('a', (acc, v) => acc+v);
    // 'a'
    reduceRight('', (acc, v) => acc+v);
    // undefined

    extra-string

    Install

    npm i @extra-string/reduce-right

    DownloadsWeekly Downloads

    0

    Version

    1.1.3

    License

    MIT

    Unpacked Size

    2.53 kB

    Total Files

    4

    Last publish

    Collaborators

    • wolfram77