las

lastreturn

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

Showing:

Popularity

Downloads/wk

1

GitHub Stars

6

Maintenance

Last Commit

7yrs ago

Contributors

0

Package

Dependencies

0

Size (min+gzip)

0.2KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

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.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100