openchemlib-utils
Advanced tools
Comparing version 1.11.0 to 2.0.0
@@ -130,4 +130,2 @@ 'use strict'; | ||
// Previously getExtendedDiastereotopicAtomIDs | ||
/** | ||
@@ -1484,12 +1482,5 @@ * | ||
if (value.value !== undefined) { | ||
value.data[colorLabel] = | ||
`hsl(${ | ||
Math.floor( | ||
((value.value - min) / (max - min)) * (maxHue - minHue) + minHue, | ||
) | ||
},${ | ||
saturation | ||
}%,${ | ||
lightness | ||
}%)`; | ||
value.data[colorLabel] = `hsl(${Math.floor( | ||
((value.value - min) / (max - min)) * (maxHue - minHue) + minHue, | ||
)},${saturation}%,${lightness}%)`; | ||
} else { | ||
@@ -1623,3 +1614,3 @@ value.data.color = 'black'; | ||
function search(moleculesDB, query, options = {}) { | ||
function search(moleculesDB, query = '', options = {}) { | ||
const { | ||
@@ -1626,0 +1617,0 @@ format = 'idCode', |
{ | ||
"name": "openchemlib-utils", | ||
"version": "1.11.0", | ||
"version": "2.0.0", | ||
"description": "Various utilities that extends openchemlib-js like HOSE codes or diastereotopic IDs", | ||
@@ -15,6 +15,7 @@ "main": "lib/index.js", | ||
"eslint-fix": "npm run eslint -- --fix", | ||
"prepublishOnly": "rollup -c", | ||
"test": "npm run test-coverage && npm run eslint", | ||
"test-coverage": "jest --coverage", | ||
"test-only": "jest" | ||
"prettier": "prettier --check src", | ||
"prettier-write": "prettier --write src", | ||
"prepare": "rollup -c", | ||
"test": "npm run test-only && npm run eslint && npm run prettier", | ||
"test-only": "jest --coverage" | ||
}, | ||
@@ -32,25 +33,14 @@ "repository": { | ||
"homepage": "https://github.com/cheminfo/openchemlib-utils#readme", | ||
"jest": { | ||
"testEnvironment": "node" | ||
}, | ||
"prettier": { | ||
"arrowParens": "always", | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-transform-modules-commonjs": "^7.17.9", | ||
"@types/jest": "^27.4.1", | ||
"@babel/plugin-transform-modules-commonjs": "^7.18.6", | ||
"@types/jest": "^28.1.6", | ||
"cheminfo-build": "^1.1.11", | ||
"eslint": "^8.13.0", | ||
"eslint-config-cheminfo": "^7.3.0", | ||
"eslint": "^8.22.0", | ||
"eslint-config-cheminfo": "^8.0.2", | ||
"eslint-plugin-import": "^2.26.0", | ||
"esm": "^3.2.25", | ||
"jest": "^27.5.1", | ||
"jest": "^28.1.3", | ||
"jest-matcher-deep-close-to": "^3.0.2", | ||
"openchemlib": "7.4.0", | ||
"prettier": "^2.6.2", | ||
"rollup": "^2.70.2" | ||
"openchemlib": "8.0.0", | ||
"prettier": "^2.7.1", | ||
"rollup": "^2.78.0" | ||
}, | ||
@@ -61,3 +51,3 @@ "dependencies": { | ||
"ml-floyd-warshall": "^1.0.4", | ||
"ml-matrix": "^6.9.0", | ||
"ml-matrix": "^6.10.2", | ||
"papaparse": "^5.3.2", | ||
@@ -67,4 +57,4 @@ "sdf-parser": "^5.0.1" | ||
"peerDependencies": { | ||
"openchemlib": ">=7.4.0" | ||
"openchemlib": ">=8.0.0" | ||
} | ||
} |
@@ -43,5 +43,5 @@ # openchemlib-utils | ||
[npm-url]: https://www.npmjs.com/package/openchemlib-utils | ||
[ci-image]: https://github.com/cheminfo/openchemlib-utils/workflows/Node.js%20CI/badge.svg?branch=master | ||
[ci-image]: https://github.com/cheminfo/openchemlib-utils/workflows/Node.js%20CI/badge.svg?branch=main | ||
[ci-url]: https://github.com/cheminfo/openchemlib-utils/actions?query=workflow%3A%22Node.js+CI%22 | ||
[download-image]: https://img.shields.io/npm/dm/openchemlib-utils.svg | ||
[download-url]: https://www.npmjs.com/package/openchemlib-utils |
@@ -61,12 +61,5 @@ export default function appendColor(moleculesDB, options = {}) { | ||
if (value.value !== undefined) { | ||
value.data[colorLabel] = | ||
`hsl(${ | ||
Math.floor( | ||
((value.value - min) / (max - min)) * (maxHue - minHue) + minHue, | ||
) | ||
},${ | ||
saturation | ||
}%,${ | ||
lightness | ||
}%)`; | ||
value.data[colorLabel] = `hsl(${Math.floor( | ||
((value.value - min) / (max - min)) * (maxHue - minHue) + minHue, | ||
)},${saturation}%,${lightness}%)`; | ||
} else { | ||
@@ -73,0 +66,0 @@ value.data.color = 'black'; |
import getMoleculeCreators from './getMoleculeCreators'; | ||
export default function search(moleculesDB, query, options = {}) { | ||
export default function search(moleculesDB, query = '', options = {}) { | ||
const { | ||
@@ -22,9 +22,9 @@ format = 'idCode', | ||
case 'exact': | ||
result = exactSearch(moleculesDB, query, limit); | ||
result = exactSearch(moleculesDB, query); | ||
break; | ||
case 'substructure': | ||
result = subStructureSearch(moleculesDB, query, limit); | ||
result = subStructureSearch(moleculesDB, query); | ||
break; | ||
case 'similarity': | ||
result = similaritySearch(moleculesDB, query, limit); | ||
result = similaritySearch(moleculesDB, query); | ||
break; | ||
@@ -31,0 +31,0 @@ default: |
import { getDiastereotopicAtomIDs } from './getDiastereotopicAtomIDs'; | ||
// Previously getExtendedDiastereotopicAtomIDs | ||
@@ -4,0 +3,0 @@ /** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11
136814
48
3907
Updatedml-matrix@^6.10.2