
Company News
Socket Partners with Replit to Block Malicious Packages in AI-Powered Development
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.
@stdlib/assert-is-iterator-like
Advanced tools
Test if a value is
iterator-like.
npm install @stdlib/assert-is-iterator-like
var isIteratorLike = require( '@stdlib/assert-is-iterator-like' );
Tests if a value is iterator-like.
var obj = {
'next': function noop() {}
};
var bool = isIteratorLike( obj );
// returns true
bool = isIteratorLike( {} );
// returns false
object having a next method following the iterator protocol.var noop = require( '@stdlib/utils-noop' );
var isIteratorLike = require( '@stdlib/assert-is-iterator-like' );
var obj = {
'next': noop
};
var bool = isIteratorLike( obj );
// returns true
bool = isIteratorLike( {} );
// returns false
bool = isIteratorLike( [] );
// returns false
bool = isIteratorLike( null );
// returns false
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
See LICENSE.
Copyright © 2016-2021. The Stdlib Authors.
FAQs
Test if a value is iterator-like.
The npm package @stdlib/assert-is-iterator-like receives a total of 2,854 weekly downloads. As such, @stdlib/assert-is-iterator-like popularity was classified as popular.
We found that @stdlib/assert-is-iterator-like demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

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.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.