rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
20 lines • 474 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.mapFirstValue = void 0;
/**
* @public
* Gets the first inserted value in a `Map`.
*
* @returns The first value in `map`, otherwise `undefined` where size 0.
*
* @remarks
* See {@link mapFirstValue}.
*/
function mapFirstValue(map) {
return map
.values()
.next()
.value;
}
exports.mapFirstValue = mapFirstValue;
//# sourceMappingURL=map-first-value.js.map