export const iteratorSymbol = ( typeof Symbol === "function" && Symbol . iterator ) || "@@iterator" ; export function singleValueIterator ( getValue ) { return function ( this ) { let done = false ; const value = getValue ( this ) ; return { next ( ) { if ( done ) return { done : true } ; done = true ; return { value , done : false } ; } , } ; } ; }