atom-sorter
Advanced tools
Comparing version
/** | ||
* Implementation of the Hill system for sorting atoms | ||
* https://en.wikipedia.org/wiki/Chemical_formula#Hill_system | ||
* @param {string} a - first atom to compare | ||
* @param {string} b - second atom to compare | ||
* @returns | ||
* @param a - first atom to compare | ||
* @param b - second atom to compare | ||
* @returns A value suitable for use in Array.prototype.sort. | ||
*/ | ||
export function atomSorter(a: string, b: string): 0 | 1 | -1; | ||
export declare function atomSorter(a: string, b: string): 0 | -1 | 1; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.atomSorter = atomSorter; | ||
/** | ||
* Implementation of the Hill system for sorting atoms | ||
* https://en.wikipedia.org/wiki/Chemical_formula#Hill_system | ||
* @param {string} a - first atom to compare | ||
* @param {string} b - second atom to compare | ||
* @returns | ||
* @param a - first atom to compare | ||
* @param b - second atom to compare | ||
* @returns A value suitable for use in Array.prototype.sort. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.atomSorter = atomSorter; | ||
function atomSorter(a, b) { | ||
@@ -12,0 +12,0 @@ if (a === b) |
{ | ||
"name": "atom-sorter", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Callback allowing to sort chemical elements (atoms) in Hill order", | ||
"main": "lib/src/index.js", | ||
"module": "src/index.js", | ||
"files": [ | ||
"src", | ||
"lib" | ||
"lib", | ||
"src" | ||
], | ||
@@ -22,3 +21,3 @@ "repository": { | ||
"homepage": "https://github.com/cheminfo/mass-tools/tree/main/packages/atom-sorter#readme", | ||
"gitHead": "838f98a30846d4b1721b8ed7aa94a55e854d7521" | ||
"gitHead": "1ac79731e790d4ea1b0b443f4c38bd68c1cc6a86" | ||
} |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
31844
0.32%0
-100%