Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
compare-cell
Advanced tools
Readme
Compares two unordered integer sequences to test if they contain the same elements. This can be used to implement various algorithms for unoriented simplicial complexes.
For more information, see the following blog post:
Comparing sequences without sorting
var compareCells = require('compare-cell')
var bsearch = require('binary-search-bounds')
//Create a list of triangles defined by indexed faces
var triangles = [
[1, 0, 2],
[2, 1, 3],
[3, 4, 5],
[5, 6, 7]
]
//Sort triangles
triangles.sort(compareCells)
//Now we can test if various cells are contained in the list in O(log n)
console.log(bsearch.eq(triangles, [2, 1, 0], compareCells) >= 0)
console.log(bsearch.eq(triangles, [3, 5, 7], compareCells) >= 0)
var d = require('compare-cells')(a, b)
Tests if two unordered lists contain the same elements.
a, b
are arrays of integersReturns An order function which tests if a
comes before or after b
. The value is 0
if they are equal.
(c) 2015 Mikola Lysenko. MIT License
FAQs
An ordering for sets of integers
The npm package compare-cell receives a total of 79,282 weekly downloads. As such, compare-cell popularity was classified as popular.
We found that compare-cell 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
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.