🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

atom-sorter

Package Overview
Dependencies
Maintainers
0
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atom-sorter - npm Package Compare versions

Comparing version

to
2.1.2

src/index.ts

8

lib/src/index.d.ts
/**
* 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