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

xy-parser

Package Overview
Dependencies
Maintainers
4
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xy-parser - npm Package Compare versions

Comparing version 5.0.1 to 5.0.2

5

lib-esm/index.d.ts

@@ -0,1 +1,2 @@

import type { TextData } from 'cheminfo-types';
import { ParseXYOptions } from './ParseXYOptions';

@@ -10,3 +11,3 @@ export * from './ParseXYOptions';

*/
export declare function parseXY(text: string, options?: ParseXYOptions): import("cheminfo-types").DataXY<import("cheminfo-types").DoubleArray>;
export declare function parseXY(text: TextData, options?: ParseXYOptions): import("cheminfo-types").DataXY<import("cheminfo-types").DoubleArray>;
/**

@@ -19,3 +20,3 @@ * Parse a text-file and returns the parsed data and information about the columns

*/
export declare function parseXYAndKeepInfo(text: string, options?: ParseXYOptions): {
export declare function parseXYAndKeepInfo(text: TextData, options?: ParseXYOptions): {
info: {

@@ -22,0 +23,0 @@ position: number;

4

lib-esm/parse.d.ts

@@ -1,2 +0,2 @@

import { DataXY } from 'cheminfo-types';
import { DataXY, TextData } from 'cheminfo-types';
import { ParseXYOptions } from './ParseXYOptions';

@@ -10,3 +10,3 @@ /**

*/
export declare function parse(text: string, options?: ParseXYOptions): {
export declare function parse(text: TextData, options?: ParseXYOptions): {
info: {

@@ -13,0 +13,0 @@ position: number;

@@ -0,1 +1,2 @@

import type { TextData } from 'cheminfo-types';
import { ParseXYOptions } from './ParseXYOptions';

@@ -10,3 +11,3 @@ export * from './ParseXYOptions';

*/
export declare function parseXY(text: string, options?: ParseXYOptions): import("cheminfo-types").DataXY<import("cheminfo-types").DoubleArray>;
export declare function parseXY(text: TextData, options?: ParseXYOptions): import("cheminfo-types").DataXY<import("cheminfo-types").DoubleArray>;
/**

@@ -19,3 +20,3 @@ * Parse a text-file and returns the parsed data and information about the columns

*/
export declare function parseXYAndKeepInfo(text: string, options?: ParseXYOptions): {
export declare function parseXYAndKeepInfo(text: TextData, options?: ParseXYOptions): {
info: {

@@ -22,0 +23,0 @@ position: number;

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

@@ -1,2 +0,2 @@

import { DataXY } from 'cheminfo-types';
import { DataXY, TextData } from 'cheminfo-types';
import { ParseXYOptions } from './ParseXYOptions';

@@ -10,3 +10,3 @@ /**

*/
export declare function parse(text: string, options?: ParseXYOptions): {
export declare function parse(text: TextData, options?: ParseXYOptions): {
info: {

@@ -13,0 +13,0 @@ position: number;

{
"name": "xy-parser",
"version": "5.0.1",
"version": "5.0.2",
"description": "Parse a text-file and convert it to an array of XY points",

@@ -48,4 +48,4 @@ "main": "./lib/index.js",

"codecov": "^3.8.3",
"eslint": "^8.9.0",
"eslint-config-cheminfo-typescript": "^10.3.0",
"eslint": "^8.11.0",
"eslint-config-cheminfo-typescript": "^10.4.0",
"jest": "^27.5.1",

@@ -55,6 +55,6 @@ "prettier": "^2.5.1",

"ts-jest": "^27.1.3",
"typescript": "^4.5.5"
"typescript": "^4.6.2"
},
"dependencies": {
"cheminfo-types": "^1.0.0",
"cheminfo-types": "^1.1.0",
"ensure-string": "^1.1.0",

@@ -61,0 +61,0 @@ "ml-array-max": "^1.2.4",

@@ -7,2 +7,13 @@ import { readFileSync } from 'fs';

test('binary', () => {
let filename = 'text1.txt';
let data = readFileSync(path + filename);
let result = parseXY(data);
expect(result.x).toBeInstanceOf(Array);
expect(result.y).toBeInstanceOf(Array);
expect(result.x).toHaveLength(13);
expect(result.y).toHaveLength(13);
});
test('text1', () => {

@@ -9,0 +20,0 @@ let filename = 'text1.txt';

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

import type { TextData } from 'cheminfo-types';
import { ParseXYOptions } from './ParseXYOptions';

@@ -13,3 +15,3 @@ import { parse } from './parse';

*/
export function parseXY(text: string, options: ParseXYOptions = {}) {
export function parseXY(text: TextData, options: ParseXYOptions = {}) {
return parse(text, options).data;

@@ -25,4 +27,7 @@ }

*/
export function parseXYAndKeepInfo(text: string, options: ParseXYOptions = {}) {
export function parseXYAndKeepInfo(
text: TextData,
options: ParseXYOptions = {},
) {
return parse(text, options);
}

@@ -1,2 +0,2 @@

import { DataXY } from 'cheminfo-types';
import { DataXY, TextData } from 'cheminfo-types';
import { ensureString } from 'ensure-string';

@@ -17,3 +17,3 @@ import mlArrayMax from 'ml-array-max';

export function parse(
text: string,
text: TextData,
options: ParseXYOptions = {},

@@ -20,0 +20,0 @@ ): {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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