npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

datax-sdk

v2.0.5

Published

Official SDK for the DataX API — CSV/JSON/XLSX/PDF/XML/YAML/Markdown transforms, batch processing, data masking, image conversion, and scheduled transforms

Readme

datax-sdk

Official Node.js/TypeScript SDK for the DataX API — transform CSV, JSON, XLSX, PDF, XML, YAML, Markdown, batch processing, data masking, image conversion, and scheduled transforms.

Install

npm install datax-sdk

Quick Start

import { DataX } from 'datax-sdk';

const client = new DataX('dk_live_YOUR_API_KEY', 'https://datax-api-production.up.railway.app');

// CSV → JSON
const result = await client.csvToJson('name,age\nRohit,28\nPriya,25');
console.log(result.data);
// [{ name: "Rohit", age: 28 }, { name: "Priya", age: 25 }]

All Methods

Core Transforms (Free)

| Method | Input | Output | |--------|-------|--------| | csvToJson(csv, opts?) | CSV string | JSON array | | jsonToCsv(data) | JSON array | CSV string | | xlsxToJson(base64, opts?) | Base64 XLSX | JSON array | | jsonToXlsx(data, sheet?) | JSON array | Base64 XLSX | | csvToXlsx(csv, sheet?) | CSV string | Base64 XLSX |

XML / YAML / Markdown (Free)

| Method | Input | Output | |--------|-------|--------| | xmlToJson(xml) | XML string | JSON object | | jsonToXml(data, rootName?) | JSON object | XML string | | yamlToJson(yaml) | YAML string | JSON object | | jsonToYaml(data) | JSON object | YAML string | | markdownToHtml(md) | Markdown string | HTML string |

PDF (Pro+)

| Method | Input | Output | |--------|-------|--------| | jsonToPdf(data, title?) | JSON array | Base64 PDF | | csvToPdf(csv, title?) | CSV string | Base64 PDF | | templatePdf(template, data, pageSize?, orientation?) | Handlebars template + data | Base64 PDF | | pdfToJson(base64, opts?) | Base64 PDF | Text, pages array, or JSON rows |

pdfToJson options: mode ('text' | 'pages' | 'table'), delimiter (for table mode)

// Extract text from PDF
const text = await client.pdfToJson(base64Pdf, { mode: 'text' });
// → { data: "Full document text...", meta: { totalPages: 3, mode: "text" } }

// Extract tabular data from PDF
const table = await client.pdfToJson(base64Pdf, { mode: 'table' });
// → { data: [{ Name: "Rohit", Age: 28 }, ...], meta: { rows: 5, mode: "table" } }

// Get text per page
const pages = await client.pdfToJson(base64Pdf, { mode: 'pages' });
// → { data: ["Page 1 text", "Page 2 text"], meta: { pages: 2, mode: "pages" } }

Data Utilities (Pro+)

| Method | Input | Output | |--------|-------|--------| | validateJson(data, schema) | JSON + JSON Schema | Validation result | | queryJson(data, expression) | JSON + JMESPath expression | Query result | | mergeCsvs(csvs) | Array of CSV strings | Merged CSV |

Batch Processing (Pro+)

const result = await client.batch([
  { type: 'csv-to-json', data: 'name,age\nRohit,28' },
  { type: 'json-to-yaml', data: { name: 'Priya', age: 25 } },
]);
console.log(result.meta); // { total: 2, succeeded: 2, failed: 0 }

| Method | Input | Output | |--------|-------|--------| | batch(operations, continueOnError?) | Array of { type, data, options? } | Per-operation results |

Data Masking / Anonymization (Pro+)

Auto-detects PII (email, phone, SSN, credit cards, passwords, API keys) or mask specific fields.

// Auto-detect PII
const masked = await client.mask([
  { name: 'Rohit', email: '[email protected]', phone: '+919876543210' },
]);
// → { name: 'Rohit', email: 'r***@example.com', phone: '+9*********10' }

// Specific fields with strategy
const redacted = await client.mask(data, {
  fields: ['email', 'ssn'],
  strategy: 'redact', // 'redact' | 'hash' | 'partial'
});

| Method | Input | Output | |--------|-------|--------| | mask(data, opts?) | JSON object/array | Masked data |

Strategies: partial (default — keeps first/last chars), redact (replaces with ***REDACTED***), hash (SHA-256 hash)

Image Conversion (Pro+)

Convert between PNG, JPEG, WebP, AVIF, TIFF with optional resize and quality control.

const result = await client.convertImage(base64Png, {
  outputFormat: 'webp',
  quality: 80,
  width: 800,
});
console.log(result.meta); // { format: 'webp', width: 800, height: 600, sizeBytes: 24530 }

| Method | Input | Output | |--------|-------|--------| | convertImage(base64, opts) | Base64 image | Base64 converted image |

Options: outputFormat (required), quality (1-100), width, height

Scheduled Transforms (Scale)

Create recurring cron-based transforms that run automatically.

// Create a schedule
const schedule = await client.createSchedule({
  name: 'Daily sales report',
  cron: '0 9 * * *',
  transformType: 'csv-to-json',
  transformInput: { data: 'name,age\nRohit,28' },
});

// Manage schedules
const all = await client.listSchedules();
const one = await client.getSchedule(schedule.id);
await client.pauseSchedule(schedule.id);
await client.resumeSchedule(schedule.id);
await client.deleteSchedule(schedule.id);

| Method | Input | Output | |--------|-------|--------| | createSchedule(input) | Name, cron, type, input | Schedule object | | listSchedules() | — | Schedule array | | getSchedule(id) | Schedule ID | Schedule object | | pauseSchedule(id) | Schedule ID | Schedule object | | resumeSchedule(id) | Schedule ID | Schedule object | | deleteSchedule(id) | Schedule ID | { message } |

File Uploads (Free)

const file = new Blob([csvContent], { type: 'text/csv' });
const result = await client.uploadCsvToJson(file);

| Method | Input | Output | |--------|-------|--------| | uploadCsvToJson(file) | CSV Blob | JSON array | | uploadXlsxToJson(file) | XLSX Blob | JSON array | | uploadPdfToJson(file, opts?) | PDF Blob | Text, pages, or JSON rows |

Async Jobs

const job = await client.createJob('csv-to-json', { data: largeCsv });
const status = await client.getJob(job.jobId);
const jobs = await client.listJobs(1, 20);

Plans

| Plan | Price | Features | |------|-------|----------| | Free | $0 | Core transforms, 100 req/month | | Starter | $5/mo | All free + XLSX export, 5,000 req/month | | Pro | $19/mo | All starter + PDF, batch, masking, image, 50,000 req/month | | Scale | $99/mo | Everything + scheduled transforms, 500,000 req/month |

License

MIT