Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bianco.is-iterable

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bianco.is-iterable

Function returning true if an object could be looped

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created
Source

bianco.is-iterable

Build Status

NPM version NPM downloads MIT License

Usage

import isIterable from 'bianco.is-iterable'

// An array should be iterable
const arr = [1, 2, 3]
isIterable(arr) // => true of course

// A generator should be iterable
const gen = (function *() {
  yield Math.random()
})()
isIterable(gen) // => true

// A DOM nodes list should be iterable
const lis = document.querySelectorAll('li')
isIterable(lis)  // => depends on the browser

// An object should not be iterable
const obj = { foo: 'foo', bar: 'bar' }
isIterable(obj) // => false

API

  • isIterable returns true if the object could be looped in a "for of" otherwise false

Keywords

FAQs

Package last updated on 03 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc