File: get-last.js

package info (click to toggle)
node-es6-set 0.1.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 216 kB
  • sloc: javascript: 638; makefile: 2
file content (11 lines) | stat: -rw-r--r-- 199 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
'use strict';

module.exports = function () {
	var value, iterator = this.values(), item;
	while (true) {
		item = iterator.next();
		if (item.done) break;
		value = item.value;
	}
	return value;
};