1.4.1 • Published 6 months ago

@neurodevs/node-xdf v1.4.1

Weekly downloads
-
License
-
Repository
github
Last release
6 months ago

node-xdf

Extensible Data Format (XDF) for persisting multi-modal, time-series data with metadata

Table of Contents

Overview

This package is a Node wrapper around the C++ libxdf library. It uses a fork of the library to serialize the XDF data to a JSON string that Node can use. It was developed and tested on a macOS system with an M-series chip.

Installation (macOS)

First, you need to install the forked libxdf library.

git clone https://github.com/neurodevs/libxdf.git
cd libxdf && cmake -S . -B build && cmake --build build
sudo mkdir -p /opt/local/lib/
sudo cp build/libxdf.dylib /opt/local/lib/

Then, install the package with your preferred package manager:

npm install @neurodevs/node-xdf

or

yarn add @neurodevs/node-xdf

Usage

XdfFileLoader

import { XdfFileLoader } from '@neurodevs/node-xdf'

async function loadXdf() {
    const loader = await XdfFileLoader.Create()

    const data = await loader.load('/path/to/file.xdf')
    console.log('XDF Data:', data)
}

Test Doubles

This package was developed using test-driven development (TDD). If you also follow TDD, you'll likely want test doubles to fake, mock, or spy certain behaviors for these classes.

import { XdfFileLoader, FakeXdfLoader } from '@neurodevs/node-lsl'

async function someTestFunction() {
    XdfFileLoader.Class = FakeXdfLoader
    const fake = await XdfFileLoader.Create()
}
1.2.0

10 months ago

1.1.1

11 months ago

1.1.0

11 months ago

1.0.0

11 months ago

1.4.1

6 months ago

1.3.2

10 months ago

1.4.0

6 months ago

1.3.1

10 months ago

1.3.0

10 months ago

1.2.1

10 months ago

0.3.5

12 months ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.4

12 months ago

0.3.3

12 months ago

0.3.0

1 year ago

0.2.1

1 year ago

0.1.2

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.2.6

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.1.3

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.1.0

1 year ago