
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
@freik/iter
Advanced tools
A library to make Javascript Iterators and Iterables reasonably useful
The idea is that I want to be able to do things like this:
const collection = new Set([1, 2, 3, 4]);
Iter(collection)
.map((f) => f * 2)
.forEach(console.log);
and that should print out
1
4
9
16
Why is this what I want? Because LINQ was awesome (and C# is a truly excellent language) and the fact that you don't actually have to first create an array before you start doing useful things to the iterable is a very good thing.
Here's perhaps a more useful example:
const aFilteredCollection = Iter.Range(0, 500000)
.filter((f) => f.value < 3)
.map((f) => ({ value: f, name: 'Less than 3' }));
// I still haven't done anything with that collection
// It's an Iter, which can be iterated over
console.log(aFilteredCollection);
// And this will create an array
const values = [...aFilteredCollection];
// This will walk the collection:
aFilteredCollection.forEach(console.log);
All this looks interesting, but I haven't done anything yet, just jotting down ideas, because the linq.js thing I found looked pretty terrible...
FAQs
A library to make iterators and iterables more usable
We found that @freik/iter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.