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

iterare

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iterare

Array methods for ES6 Iterators

  • 1.2.1
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.3M
decreased by-5.35%
Maintainers
1
Weekly downloads
 
Created

What is iterare?

The iterare npm package provides a set of utilities for working with iterables in JavaScript. It allows you to create, transform, and consume iterables in a functional programming style.

What are iterare's main functionalities?

Creating Iterables

You can create an iterable from an array or any other iterable object using the `iterate` function.

const { iterate } = require('iterare');

const iterable = iterate([1, 2, 3, 4]);
console.log([...iterable]); // Output: [1, 2, 3, 4]

Transforming Iterables

You can transform iterables using methods like `map` and `filter` to apply functions to each element or filter elements based on a condition.

const { iterate } = require('iterare');

const iterable = iterate([1, 2, 3, 4])
  .map(x => x * 2)
  .filter(x => x > 4);
console.log([...iterable]); // Output: [6, 8]

Consuming Iterables

You can consume iterables using methods like `reduce` to aggregate values or perform other operations that consume the iterable.

const { iterate } = require('iterare');

const iterable = iterate([1, 2, 3, 4]);
const sum = iterable.reduce((acc, val) => acc + val, 0);
console.log(sum); // Output: 10

Other packages similar to iterare

Keywords

FAQs

Package last updated on 06 Jun 2020

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