
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
data-tide-js
Advanced tools
⚠️ Warning: This library is currently under development and IS NOT suitable for production usage.
DataTide is a high-performance Node.js library for processing large datasets using worker threads. It provides a simple, stream-based API for parallel data processing with built-in error handling and backpressure support.
This library uses eval()
to deserialize transform functions in worker threads. While basic security checks are implemented, it may not be completely safe against all forms of code injection. Use with caution and avoid processing untrusted input.
⚠️ Warning: The methodology used to serialize and deserialize functions is experimental and may change in the future.
npm install data-tide-js
import DataTide from "data-tide-js";
import { ProcessStep } from "data-tide-js/types";
// Create a DataTide instance
const dataTide = new DataTide({
keepOrder: true, // Maintain input order
failureBehavior: "ignore-row", // Skip failed rows
concurrency: 4, // Number of worker threads
});
// Define processing steps
const steps: ProcessStep<number, number>[] = [
{
name: "double",
transform: (num: number) => num * 2,
},
{
name: "add-ten",
transform: async (num: number) => {
await someAsyncOperation();
return num + 10;
},
},
];
// Process array data
const result = await dataTide.process([1, 2, 3, 4, 5], steps);
console.log(result); // [12, 14, 16, 18, 20]
// Or process streams
const inputStream = createReadStream("input.json");
const transformStream = await dataTide.process(inputStream, steps);
transformStream.pipe(createWriteStream("output.json"));
keepOrder
(boolean, default: false): Maintain the order of processed itemsfailureBehavior
('fail-all' | 'ignore-row' | 'early-return', default: 'fail-all'): How to handle errorsconcurrency
(number, default: CPU cores): Number of worker threads to usefail-all
: Stop processing and throw error on first failureignore-row
: Skip failed items and continue processingearly-return
: Stop processing but return successfully processed itemsDataTide
constructor(options?: Partial<DataTideOptions>)
process<T, R>(data: T[] | Readable, steps: ProcessStep<T, R>[]): Promise<R[] | Transform>
ProcessStep<T, R>
interface ProcessStep<T = unknown, R = unknown> {
transform: (data: T) => Promise<R> | R;
name?: string;
}
Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
MIT License - see LICENSE file for details
Please report any issues on our GitHub issue tracker.
FAQs
A powerful javascript library to process big chunks of data
We found that data-tide-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.