#brukerconverter
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![David deps][david-image]][david-url]
[![npm download][download-image]][download-url]
Installation
Node JS
npm install brukerconverter
Bower
bower install brukerconverter
Methods
convert(jcamp, [options], [useWorker])
Converts the jcamp
using options
.
Arguments
jcamp
- String containing the JCAMP dataoptions
- Object with options to pass to the converteruseWorker
- Browser only: convert in a web worker (default: false). If this option is set to true, it will return a Promise.
Options
- keepSpectra - Generate array for 2D NMR spectra (default: false)
Use as a module
####Node JS
var converter = require('jcampconverter');
var jcamp = require('fs').readFileSync('path/to/jcamp.dx').toString();
var result = converter.convert(jcamp);
AMD
require(['jcampconverter'], function(JcampConverter) {
JcampConverter.convert(jcamp, true).then(function (result) {
});
});
Testing and build
npm install
grunt