"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/es5-ext/node_modules/es6-iterator/is-iterable.js" (11 Apr 2017, 452 Bytes) of package /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 'use strict';
    2 
    3 var isArguments    = require('es5-ext/function/is-arguments')
    4   , isString       = require('es5-ext/string/is-string')
    5   , iteratorSymbol = require('es6-symbol').iterator
    6 
    7   , isArray = Array.isArray;
    8 
    9 module.exports = function (value) {
   10     if (value == null) return false;
   11     if (isArray(value)) return true;
   12     if (isString(value)) return true;
   13     if (isArguments(value)) return true;
   14     return (typeof value[iteratorSymbol] === 'function');
   15 };