
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
###Some Array Extensions
####Examples:
var arrayExt = require('array-ext');
var arr = [128, 255, 255];
arr.toHex(); // 80 ff ff
//Compare
arr.eq([128, 255]); // true
//new array unique entries
var arr3 = arr.uniquef();
//Remove dupplicated entries
arr.unique(); // arr will be [128, 255]
var arr1 = [
{ ip: '192.168.1.1', name: 'gateway' },
{ ip: '192.168.1.1', name: 'gateway' },
{ ip: '192.168.1.2', name: 'gateway' },
{ ip: '192.168.1.3', name: 'gateway' }
];
arr1.unique('ip'); // by porperty name
arr.contains(128); // true
arr1.contains('ip', {ip: '192.168.1.1'}); // true // by poperty name
var arr2 = [
{ ip: '192.168.1.100', name: 'gateway' },
{ ip: '192.168.1.1', name: 'gateway' },
{ ip: '192.168.1.200', name: 'gateway' },
{ ip: '192.168.1.30', name: 'gateway' }
];
arr1.contains('ip', arr2); // true
// push an entry if not already in
arr.add(128); //
//remove
arr.removeDup(128); // will remove entry 128
//remove all by array
arr1.removeDup('ip', arr2);
//same than forEach, except counting form the end
//usefull if entries will be deleted in callback
arr.lastThat(function(entry, index, array){
});
FAQs
Some Array extensions
We found that array-ext 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.