Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

atom-sorter

Package Overview
Dependencies
Maintainers
6
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 0.0.4 to 0.4.2

33

package.json
{
"name": "atom-sorter",
"version": "0.0.4",
"version": "0.4.2",
"description": "Callback allowing to sort chemical elements (atoms) in Hill order",
"main": "./src/index.js",
"main": "src/index.js",
"files": [
"src"
],
"scripts": {
"eslint": "eslint src test",
"eslint-fix": "npm run eslint -- --fix",
"test": "run-s testonly eslint",
"test-travis": "eslint src && jest --coverage && codecov",
"testonly": "jest",
"build": "cheminfo build --no-source-map"
},
"repository": {
"type": "git",
"url": "https://github.com/cheminfo-js/atom-sorter.git"
"url": "git+https://github.com/cheminfo-js/mf-parser.git"
},
"keywords": [],
"author": "Luc Patiny <luc@patiny.com>",
"author": "Luc Patiny",
"license": "MIT",
"bugs": {
"url": "https://github.com/cheminfo-js/atom-sorter/issues"
"url": "https://github.com/cheminfo-js/mf-parser/issues"
},
"homepage": "https://github.com/cheminfo-js/atom-sorter#readme",
"jest": {
"testEnvironment": "node"
},
"devDependencies": {
"cheminfo-tools": "^1.20.1",
"codecov": "^3.0.0",
"eslint": "^4.12.0",
"eslint-config-cheminfo": "^1.8.0",
"eslint-plugin-no-only-tests": "^2.0.0",
"jest": "^21.2.1",
"npm-run-all": "^4.1.2"
"homepage": "https://github.com/cheminfo-js/mf-parser/tree/master/packages/atom-sorter#readme",
"dependencies": {
"molecular-formula-generator": "^0.0.0"
}
}
# atom-sorter
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![npm download][download-image]][download-url]
Callback allowing to sort chemical elements (atoms) in Hill order
.
## Installation
`$ npm install atom-sorter`
`$ npm install --save atom-sorter`
## [API Documentation](https://cheminfo-js.github.io/atom-sorter/)
## Usage
## Example
```js
const atomSorter = require('atom-sorter');
import library from 'atom-sorter';
let atoms = ['H', 'Cl', 'C', 'O', 'N', 'Br'];
atoms.sort((a, b) => atomSorter(a, b));
// ['C', 'H', 'Br', 'Cl', 'N', 'O']
const result = library(args);
// result is ...
```
## License
[MIT](./LICENSE)
[MIT](./LICENSE)
[npm-image]: https://img.shields.io/npm/v/atom-sorter.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/atom-sorter
[travis-image]: https://img.shields.io/travis/cheminfo-js/atom-sorter/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/cheminfo-js/atom-sorter
[codecov-image]: https://img.shields.io/codecov/c/github/cheminfo-js/atom-sorter.svg?style=flat-square
[codecov-url]: https://codecov.io/gh/cheminfo-js/atom-sorter
[david-image]: https://img.shields.io/david/cheminfo-js/atom-sorter.svg?style=flat-square
[david-url]: https://david-dm.org/cheminfo-js/atom-sorter
[download-image]: https://img.shields.io/npm/dm/atom-sorter.svg?style=flat-square
[download-url]: https://www.npmjs.com/package/atom-sorter
'use strict';
function atomSorter(a, b) {

@@ -5,0 +4,0 @@ if (a === b) return 0;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc