the-forest/client/node_modules/es-abstract/2015/CreateIterResultObject.js

16 lines
349 B
JavaScript
Raw Normal View History

2024-09-17 20:35:18 -04: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
};
};