ndim-parser
TypeScript icon, indicating that this package has built-in type declarations

0.5.1 • Public • Published

ndim-parser

NPM version build status Test coverage npm download

File parser for n-dimensional values.

Installation

$ npm i ndim-parser

Usage

import { ndParse } from 'ndim-parser';

const simpleExample = `
meta.first,1
meta.second,,2
temp, volt, curr
1,1,1
2,2,2
3,3,3
`;

expect(ndParse(simpleExample, { separator: ',' })).toStrictEqual({
  data: {
    t: { data: [1, 2, 3], label: 'temp' },
    v: { data: [1, 2, 3], label: 'volt' },
    c: { data: [1, 2, 3], label: 'curr' },
  },
  meta: {
    'meta.first': '1',
    'meta.second': '2',
  },
});

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i ndim-parser

Weekly Downloads

2

Version

0.5.1

License

MIT

Unpacked Size

56.5 kB

Total Files

23

Last publish

Collaborators

  • cheminfo-bot
  • maasencioh