
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
An easy object search library. It allows scanning objects regardless of their type for properties that match the search criteria.
const { searchLite } = require("searchLite");
This method will find and return the first element that matches the search criteria.
function findStuff(myIterable, myProperty, valueToCompare){
const search = searchlite.find(myIterable, myProperty, valueToCompare);
if (search.success) {
return search.result;
} else if (search.failure) {
//do something
}
}
The return value is a SearchResult.
class SearchResult {
count : Number;
result : any;
}
If the search was a failed search, then SearchResult will be structured as follows:
SearchResult = {
count : -1,
result : {}
}
This method will return a list of results and the count of elements that matched the search criteria.
class SearchResult {
count : Number; //number of results
result : Array<any>; //list of results
}
##update(myIterable, myProperty, myNewData)
This method will update the first element that matches the search criteria with the new properties.
const myIterable = [
{id:1, bar: 'fooA'},
{id:2, bar: 'fooB'},
{id:3, bar: 'fooC'},
]
searchLite.update({
myIterable,
"id",
{
id: 1,
bar : 'fooZ'
}
});
Resulting in:
/*
myIterable
[
{id:1, bar: 'fooZ'},
{id:2, bar: 'fooB'},
{id:3, bar: 'fooC'},
]
*/
This method removes the first element from an Array and returns the new Array.
This method will remove any first element from an Iterable that matches the search criteria.
FAQs
an easy object search library
We found that searchlite 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.