Projekt

Obecné

Profil

Stáhnout (434 Bajtů) Statistiky
| Větev: | Revize:
1
'use strict';
2

    
3
var GetIntrinsic = require('../GetIntrinsic');
4

    
5
var $TypeError = GetIntrinsic('%TypeError%');
6

    
7
var Type = require('./Type');
8

    
9
// https://ecma-international.org/ecma-262/6.0/#sec-createiterresultobject
10

    
11
module.exports = function CreateIterResultObject(value, done) {
12
	if (Type(done) !== 'Boolean') {
13
		throw new $TypeError('Assertion failed: Type(done) is not Boolean');
14
	}
15
	return {
16
		value: value,
17
		done: done
18
	};
19
};
(10-10/109)