
Product
Introducing the Alert Details Page: A Better Way to Explore Alerts
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.
utils-compare
Advanced tools
Utility compare function that accepts two objects (a, b) and returns 1 if a >= b otherwise -1.

Compare function that accepts two objects (a, b) and returns 1 if a >= b otherwise -1.
Open the command prompt in the root of your project and run the following command:
npm i utils-compare --save-dev
Example "globbing" utility, using the compare function to sort the result:
var compareFn = require('utils-compare');
var globFiles = function (src, compare_fn) {
compare_fn = compareFn(compare_fn);
src.map(function (path) {
index += 1;
return {
index: index,
path: path,
content: grunt.file.read(path)
};
}).sort(compare_fn).map(function (foo) {
// do stuff
});
};
Licensed under the MIT License Copyright (c) Jon Schlinkert, contributors.
FAQs
Utility compare function that accepts two objects (a, b) and returns 1 if a >= b otherwise -1.
The npm package utils-compare receives a total of 0 weekly downloads. As such, utils-compare popularity was classified as not popular.
We found that utils-compare 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.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.