13 lines
346 B
Plaintext
13 lines
346 B
Plaintext
'use strict';
|
|
|
|
var hasOwn = require('hasown');
|
|
|
|
module.exports = function isIteratorRecord(value) {
|
|
return value
|
|
&& hasOwn(value, '[[Iterator]]')
|
|
&& hasOwn(value, '[[NextMethod]]')
|
|
&& typeof value['[[NextMethod]]'] === 'function'
|
|
&& hasOwn(value, '[[Done]]')
|
|
&& typeof value['[[Done]]'] === 'boolean';
|
|
};
|