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

@ts-common/iterator

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ts-common/iterator - npm Package Compare versions

Comparing version 0.0.20 to 0.0.21

1

index.d.ts
export declare function iterable<T>(createIterator: () => Iterator<T>): Iterable<T>;
export declare function map<T, I>(input: Iterable<I>, func: (v: I, i: number) => T): Iterable<T>;
export declare function forEach<T>(input: Iterable<T>, func: (v: T, i: number) => void): void;
export declare function filterMap<T, I>(input: Iterable<I>, func: (v: I, i: number) => T | undefined): Iterable<T>;

@@ -4,0 +5,0 @@ export declare function filter<T>(input: Iterable<T>, func: (v: T) => boolean): Iterable<T>;

@@ -20,2 +20,10 @@ "use strict";

exports.map = map;
function forEach(input, func) {
let i = 0;
for (const v of input) {
func(v, i);
++i;
}
}
exports.forEach = forEach;
function filterMap(input, func) {

@@ -22,0 +30,0 @@ function* iterator() {

2

package.json
{
"name": "@ts-common/iterator",
"version": "0.0.20",
"version": "0.0.21",
"description": "Iterator library for JavaScript and TypeScript",

@@ -5,0 +5,0 @@ "main": "index.js",

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