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

sdf-parser

Package Overview
Dependencies
Maintainers
4
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sdf-parser - npm Package Compare versions

Comparing version 5.0.1 to 5.0.2

src/__tests__/__snapshots__/getEntriesBoundaries.test.js.snap

13

lib/index.js

@@ -26,4 +26,9 @@ 'use strict';

res.push([previous, next]);
previous = next =
string.indexOf(eol, next + substring.length) + eol.length;
const nextMatch = string.indexOf(eol, next + substring.length);
if (nextMatch === -1) {
next = -1;
} else {
previous = nextMatch + eol.length;
next = previous;
}
} else {

@@ -188,5 +193,5 @@ res.push([previous, string.length]);

time: Date.now() - start,
molecules: molecules,
molecules,
labels: Object.keys(labels),
statistics: statistics,
statistics,
};

@@ -193,0 +198,0 @@ }

{
"name": "sdf-parser",
"version": "5.0.1",
"version": "5.0.2",
"description": "SDF parser",

@@ -46,14 +46,14 @@ "main": "lib/index.js",

"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.16.8",
"@babel/plugin-transform-modules-commonjs": "^7.18.6",
"babel-eslint": "^10.1.0",
"callback-stream": "^1.1.0",
"cheminfo-build": "^1.1.11",
"eslint": "^8.10.0",
"eslint-config-cheminfo": "^7.3.0",
"jest": "^27.5.1",
"openchemlib": "^7.4.3",
"prettier": "^2.5.1"
"eslint": "^8.22.0",
"eslint-config-cheminfo": "^8.0.2",
"jest": "^28.1.3",
"openchemlib": "^8.0.1",
"prettier": "^2.7.1"
},
"dependencies": {
"ensure-string": "^1.1.0",
"ensure-string": "^1.2.0",
"pumpify": "^2.0.1",

@@ -60,0 +60,0 @@ "split2": "^4.1.0",

@@ -27,1 +27,8 @@ import fs from 'fs';

});
test('should parse sdf files without EOL in the EOF', () => {
const eol = '\n';
const sdf = fs.readFileSync(`${__dirname}/test4.sdf`, 'utf-8');
expect(getEntriesBoundaries(sdf, `${eol}$$$$`, eol)).toMatchSnapshot();
});

@@ -9,4 +9,9 @@ export function getEntriesBoundaries(string, substring, eol) {

res.push([previous, next]);
previous = next =
string.indexOf(eol, next + substring.length) + eol.length;
const nextMatch = string.indexOf(eol, next + substring.length);
if (nextMatch === -1) {
next = -1;
} else {
previous = nextMatch + eol.length;
next = previous;
}
} else {

@@ -13,0 +18,0 @@ res.push([previous, string.length]);

@@ -156,6 +156,6 @@ import { ensureString } from 'ensure-string';

time: Date.now() - start,
molecules: molecules,
molecules,
labels: Object.keys(labels),
statistics: statistics,
statistics,
};
}
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