Frontend/25_01_07/mai/node_modules/es-abstract/2018/CreateIterResultObject.js

16 lines
349 B
JavaScript
Raw Permalink Normal View History

2025-01-28 10:38:27 +00:00
'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
};
};