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

is-iterable

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-iterable

Checks if a given object is iterable

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
184K
increased by6.69%
Maintainers
2
Weekly downloads
 
Created

What is is-iterable?

The is-iterable npm package is a utility that allows you to check if a given value is iterable. This can be useful in various scenarios where you need to ensure that a value can be iterated over, such as in loops or when using spread operators.

What are is-iterable's main functionalities?

Check if a value is iterable

This feature allows you to check if a given value is iterable. The code sample demonstrates checking various types of values, including arrays, strings, numbers, and objects.

const isIterable = require('is-iterable');

console.log(isIterable([1, 2, 3])); // true
console.log(isIterable('hello')); // true
console.log(isIterable(123)); // false
console.log(isIterable({})); // false

Other packages similar to is-iterable

Keywords

FAQs

Package last updated on 18 Dec 2017

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