0.5.1 • Published 2 years ago

ndim-parser v0.5.1

Weekly downloads
37
License
MIT
Repository
github
Last release
2 years ago

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

0.5.0

2 years ago

0.5.1

2 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago