
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
node-labstreaminglayer
Advanced tools
Node.js bindings for Lab Streaming Layer (LSL) - A system for unified collection of measurement time series in research experiments.
npm install node-labstreaminglayer
import { StreamInfo, StreamOutlet } from 'node-labstreaminglayer';
// Create stream info
const info = new StreamInfo('MyStream', 'EEG', 8, 100, 'float32', 'uniqueid123');
// Create outlet and start streaming
const outlet = new StreamOutlet(info);
// Send data
const sample = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0];
outlet.pushSample(sample);
import { resolveStreams, StreamInlet } from 'node-labstreaminglayer';
// Find available streams
const streams = resolveStreams();
if (streams.length > 0) {
// Connect to first stream
const inlet = new StreamInlet(streams[0]);
// Receive data
const [sample, timestamp] = inlet.pullSample();
console.log('Received:', sample, 'at', timestamp);
}
Stores the declaration of a data stream.
const info = new StreamInfo(
name, // Stream name
type, // Content type (e.g., 'EEG', 'Markers')
channelCount, // Number of channels
nominalSrate, // Sampling rate (Hz) or IRREGULAR_RATE
channelFormat, // Data type: 'float32', 'double64', 'string', etc.
sourceId // Unique source identifier (optional)
);
Makes streaming data available on the network.
const outlet = new StreamOutlet(info, chunkSize?, maxBuffered?);
outlet.pushSample(sample, timestamp?, pushthrough?);
outlet.pushChunk(samples, timestamp?, pushthrough?);
outlet.haveConsumers();
outlet.waitForConsumers(timeout);
Receives streaming data from the network.
const inlet = new StreamInlet(info, maxBuflen?, maxChunklen?, recover?, processingFlags?);
const [sample, timestamp] = inlet.pullSample(timeout?);
const [samples, timestamps] = inlet.pullChunk(timeout?, maxSamples?);
inlet.timeCorrection(timeout?);
inlet.openStream(timeout?);
inlet.closeStream();
// Find all streams
const streams = resolveStreams(waitTime?);
// Find by property
const eegStreams = resolveByProp('type', 'EEG');
// Find by predicate (XPath)
const filtered = resolveByPred("name='MyStream' and type='EEG'");
// Continuous resolution
const resolver = new ContinuousResolver();
const currentStreams = resolver.results();
import {
IRREGULAR_RATE, // 0.0 - for irregular sampling
FOREVER, // 32000000.0 - for infinite timeout
proc_clocksync, // Clock synchronization flag
proc_dejitter, // Dejitter timestamps flag
proc_ALL // All processing flags
} from 'node-labstreaminglayer';
The package includes several example scripts in the src/examples directory:
SendData.ts - Stream multi-channel dataReceiveData.ts - Receive and display dataSendStringMarkers.ts - Send event markersReceiveStringMarkers.ts - Receive event markersHandleMetadata.ts - Work with stream metadataRun examples after building:
npm run build
node dist/examples/SendData.js
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run tests
npm test
lsl_amd64.dll or lsl_i386.dll)lsl.so)lsl.dylib)MIT
This package provides Node.js bindings for the Lab Streaming Layer (LSL) library.
Haowen John Wei
GitHub: https://github.com/HaowenWeiJohn
Contributions are welcome! Please feel free to submit a Pull Request.
FAQs
Node.js bindings for Lab Streaming Layer (LSL)
The npm package node-labstreaminglayer receives a total of 3 weekly downloads. As such, node-labstreaminglayer popularity was classified as not popular.
We found that node-labstreaminglayer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.