Frontend/25_01_07/mai/node_modules/es-abstract/2019/CreateIterResultObject.js
szabomarton 7f4a15b9c3 asd
2025-01-28 11:38:27 +01:00

16 lines
349 B
JavaScript

'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-createiterresultobject
module.exports = function CreateIterResultObject(value, done) {
if (typeof done !== 'boolean') {
throw new $TypeError('Assertion failed: Type(done) is not Boolean');
}
return {
value: value,
done: done
};
};