@ezs/basics
Version:
Basics statements for EZS
36 lines (34 loc) • 517 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function OBJCount(data, feed) {
if (this.isLast()) {
feed.send(this.getIndex() - 1);
} else {
feed.end();
}
}
/**
* Count how many objects are received, and yield the total.
*
* Input:
*
* ```json
* ["a", "b", "c", "d"]
* ```
*
* Output:
*
* ```json
* [4]
* ```
*
* @name OBJCount
* @param {undefined} none
* @returns {Number}
*/
var _default = exports.default = {
OBJCount
};