lastreturn

    1.0.0 • Public • Published

    lastreturn

    get the last return value of a function as argument in the next call

    var lastreturn = require('lastreturn');
     
    var normalize = lastreturn(function(val, last) {
      if (val !== last) console.log(val);
      return val;
    });
     
    normalize('a');
    normalize('a');
    normalize('b');
    normalize('b');
    normalize('b');
    normalize('c');
    normalize('c');
     
    // will output: abc

    Installation

    Node

    npm install lastreturn

    License

    Copyright (c) 2014 Simon Kusterer Licensed under the MIT license.

    Keywords

    Install

    npm i lastreturn

    DownloadsWeekly Downloads

    5

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • xat