
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
(Pronounced Call-O)! Super lightweight (No dependencies) utility package for dealing with in memory collections. It's like Mongoose and Lodash in one. It's like Collections Lodash [Col Lo].
npm i -S colloimport Collo from 'collo';
const myCollection = [
{
id: 1,
name: 'pigeon'
},
{
id: 2,
name: 'badger'
},
{
id: 3,
name: 'squirrel'
}
];
const collection = new Collo(myCollection);
To Promisify the response : After you instantiate Collo, and before you use the api, trigger promisification. You can use chaining or you can call collection.promisify() by itself.
The same is true of unpromisify.
const collection = new Collo(myCollection);
collection
.promisify()
.list()
.then(items=>console.log(items))
.catch(err=>console.log(err));
There is a next and error fn on the instance that streams results on change or on error respectively.
collection
.subscribe(
res=>console.log('NEXT ',res),
err=>console.log('ERROR ',err)
);
collection
.next(res=>console.log(res))
.error(err=>console.log(err));
Promisify the responses
collection.promisify()
Un promisify the responses. So normal returns are triggered on api calls
collection.unPromisify()
Get the index of an item by key/value
const response = collection.getTheIndexOf({id:1})
List all the items in the collection instance
const response = collection.list()
Pluck an item by key/value
const response = collection.findWhere({id:1})
Return a Boolean true if the item is in the collection, or false if not
const response = collection.exists({id:1})
Insert an item at the end of the stack. Returns the collection after mutation.
const response = collection.insert({
id: 3,
name: 'Paki Paki'
})
Splice in an item at a certain index. Returns the collection after mutation
const response = collection.insertAtIndex({
id: 3,
name: 'Paki Paki'
},index)
Super handy upsert function. If the key/value is found then the data is updated, otherwise it's pushed into the stack. Returns the collection after mutation.
const response = collection.upsert({id:3},{
id: 3,
name: 'Paki Paki'
})
Update an item where the key/value match an item in the collection. Returns the collection after mutation.
const response = collection.updateWhere({id:2},{
id: 2,
name: 'Mama Chiggy'
})
Remove an item where the key/value matches an item in the collection. Returns the collection after mutation.
const response = collection.removeWhere({id:3})
If you would like to contribute, find an issue, or have a feature request, create an Issue. Also, see CONTRIBUTORS.md for contribution instructions
FAQs
A simple npm utility package for managing collection functions
The npm package collo receives a total of 18 weekly downloads. As such, collo popularity was classified as not popular.
We found that collo demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.

Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.

Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.