You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
349 B
16 lines
349 B
5 months ago
|
'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
|
||
|
};
|
||
|
};
|