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

check-iterable

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-iterable

A toolbox to check if an object is iterable, an iterator or a generator, etc.

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Check Iterable

A toolbox to check if an object is iterable, an iterator or a generator, etc.

Install

Node.js

npm i check-iterable

Deno

import * as CheckIterable from "https://deno.land/x/check_iterable/index.js";

API

  • isIterable(obj: any): boolean Checks if the given object is an Iterable (implemented @@iterator).
  • isAsyncIterable(obj: any): boolean Checks if the given object is an AsyncIterable (implemented @@asyncIterator).
  • isIteratorLike(obj: any): boolean Checks if the given object is an IteratorLike (implemented next).
  • isIterableIterator(obj: any): boolean Checks if the given object is an IterableIterator (implemented both @@iterator and next).
  • isAsyncIterableIterator(obj: any): boolean Checks if the given object is an AsyncIterableIterator (implemented both @@asyncIterator and next).
  • isGenerator(obj: any): boolean Checks if the given object is a Generator.
  • isAsyncGenerator(obj: any): boolean Checks if the given object is an AsyncGenerator.

Note:

These functions are designed to test whether an object suits the specifications suggested on MDN in sloppy mode, go to MDN for more details.

Keywords

FAQs

Package last updated on 19 Sep 2023

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