Socket
Socket
Sign inDemoInstall

3h-iter

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    3h-iter

An iteration lib.


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Install size
66.6 kB
Created
Weekly downloads
 

Readme

Source

3h-iter

An iterator lib.

Introduction

3h-iter is an iterator library that provides useful iterator-related helpers, such as map, range, chain, zip and so on. It is recommanded to use 3h-iter with ES2015+ syntax.

Example Usage

import { range, zip } from '3h-iter';

for (const i of range(5)) {
    console.log(i);
}
// Prints 0 through 4 in console.

const numbers = [0, 1, 2];
const strings = ['a', 'b', 'c'];
for (const tuple of zip(numbers, strings)) {
    console.log(tuple);
}
// Prints the following tuples:
// [ 0, 'a' ]
// [ 1, 'b' ]
// [ 2, 'c' ]
  • API Reference
  • Changelog
  • License (MIT)

Keywords

FAQs

Last updated on 24 Jan 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc