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.0 to 5.0.1

13

lib/index.js

@@ -5,2 +5,3 @@ 'use strict';

var ensureString = require('ensure-string');
var pipeline = require('pumpify');

@@ -35,2 +36,12 @@ var split2 = require('split2');

/**
* Parse a SDF file
* @param {string|ArrayBuffer|Uint8Array} sdf SDF file to parse
* @param {any} [options={}]
* @param {array<string>} [options.include] List of fields to include
* @param {array<string>} [options.exclude] List of fields to exclude
* @param {boolean} [options.dynamicTyping] Dynamically type the data
* @param {object} [options.modifiers] Object containing callbacks to apply on some specific fields
* @param {boolean} [options.mixedEOL=false] Set to true if you know there is a mixture between \r\n and \n
*/
function parse(sdf, options = {}) {

@@ -46,2 +57,3 @@ const {

sdf = ensureString.ensureString(sdf);
if (typeof sdf !== 'string') {

@@ -185,2 +197,3 @@ throw new TypeError('Parameter "sdf" must be a string');

const filterStream = filter__default["default"].bind(null, { objectMode: true });
function filterCb(chunk) {

@@ -187,0 +200,0 @@ return chunk.length > 1 && chunk.trim().length > 1;

16

package.json
{
"name": "sdf-parser",
"version": "5.0.0",
"version": "5.0.1",
"description": "SDF parser",

@@ -11,2 +11,3 @@ "main": "lib/index.js",

],
"sideEffects": false,
"scripts": {

@@ -46,15 +47,16 @@ "build": "npm run compile && cheminfo-build --root SDFParser",

"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.15.4",
"@babel/plugin-transform-modules-commonjs": "^7.16.8",
"babel-eslint": "^10.1.0",
"callback-stream": "^1.1.0",
"cheminfo-build": "^1.1.11",
"eslint": "^7.32.0",
"eslint-config-cheminfo": "^6.0.1",
"jest": "^27.2.5",
"eslint": "^8.10.0",
"eslint-config-cheminfo": "^7.3.0",
"jest": "^27.5.1",
"openchemlib": "^7.4.3",
"prettier": "^2.4.1"
"prettier": "^2.5.1"
},
"dependencies": {
"ensure-string": "^1.1.0",
"pumpify": "^2.0.1",
"split2": "^3.2.2",
"split2": "^4.1.0",
"through2": "^4.0.2",

@@ -61,0 +63,0 @@ "through2-filter": "^3.0.0"

@@ -0,3 +1,14 @@

import { ensureString } from 'ensure-string';
import { getEntriesBoundaries } from './getEntriesBoundaries';
/**
* Parse a SDF file
* @param {string|ArrayBuffer|Uint8Array} sdf SDF file to parse
* @param {any} [options={}]
* @param {array<string>} [options.include] List of fields to include
* @param {array<string>} [options.exclude] List of fields to exclude
* @param {boolean} [options.dynamicTyping] Dynamically type the data
* @param {object} [options.modifiers] Object containing callbacks to apply on some specific fields
* @param {boolean} [options.mixedEOL=false] Set to true if you know there is a mixture between \r\n and \n
*/
export function parse(sdf, options = {}) {

@@ -13,2 +24,3 @@ const {

sdf = ensureString(sdf);
if (typeof sdf !== 'string') {

@@ -15,0 +27,0 @@ throw new TypeError('Parameter "sdf" must be a string');

@@ -9,2 +9,3 @@ import pipeline from 'pumpify';

const filterStream = filter.bind(null, { objectMode: true });
function filterCb(chunk) {

@@ -11,0 +12,0 @@ return chunk.length > 1 && chunk.trim().length > 1;

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