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

uniconverter

v1.0.0

Published

Uniconverter is a modern, modular, and framework-agnostic universal data converter. It supports parsing and formatting between 5 major text-based data formats: - **CSV** (Comma-Separated Values) - **TSV** (Tab-Separated Values) - **JSON** (JavaScript Obje

Readme

Uniconverter

Uniconverter is a modern, modular, and framework-agnostic universal data converter. It supports parsing and formatting between 5 major text-based data formats:

  • CSV (Comma-Separated Values)
  • TSV (Tab-Separated Values)
  • JSON (JavaScript Object Notation)
  • XML (eXtensible Markup Language)
  • YAML (YAML Ain't Markup Language)

With a focus on the DRY (Don't Repeat Yourself) principle, it is designed as a Monorepo containing 20 individual dual-directional parsing packages centered around a fast JSON-Hub.

Features

  • Agnostic & Universal: Runs flawlessly on the Browser, Node.js, Deno, and Edge environments. No Node-specific dependencies (like fs or path) are enforced in the parsing logic.
  • Modular (NPM Workspaces): You can install the entire library, or just the specific converter you need.
  • Fully Typed: 100% written in TypeScript.
  • Fast: Leverages lightweight dependencies like fast-xml-parser and yaml where native parsing isn't enough.

Usage

1. Using the Fluent API (Unified Converter)

If you install the root uniconverter package, you get access to the advanced, framework-agnostic Converter class which supports files, URLs, and chained conversions. Node-specific libraries (fs) are imported dynamically only when you call .fromFile() or .toFile(), making this class perfectly safe for Web Browsers and React/Vue!

npm install uniconverter
import { Converter } from 'uniconverter';

// From URL to File (e.g. JSON API to XML File)
await Converter.fromUrl('https://jsonplaceholder.typicode.com/users/1', 'json')
               .toType('xml')
               .toFile('./output.xml');

// From File to Memory (e.g. YAML File to TSV String)
const tsvString = await Converter.fromFile('./data.yaml', 'yaml')
                                 .toType('tsv')
                                 .toString();

// Chained Conversions from raw string
const yamlString = Converter.fromString("id,name\n1,Alice", "csv")
                            .toType("tsv")
                            .toType("yaml")
                            .toString();

// Or to a native JSON Array/Object
const dataObject = Converter.fromString("user:\n  name: Alice", "yaml")
                            .toType("json")
                            .toJson();

2. Using Modular Packages (Recommended for Web)

To keep your bundle sizes small, you can install only the exact converter pair you need:

npm install @uniconverter/yaml-to-csv
import { yamlToCsv } from '@uniconverter/yaml-to-csv';

const csvData = yamlToCsv("- name: Alice\n  age: 25\n- name: Bob\n  age: 30");
console.log(csvData);

Available Packages

CSV Converters

@uniconverter/csv-to-json

import { csvToJson } from '@uniconverter/csv-to-json';
const data = csvToJson("id,name\n1,Alice");
// Output: [ { id: '1', name: 'Alice' } ]

@uniconverter/csv-to-tsv

import { csvToTsv } from '@uniconverter/csv-to-tsv';
const data = csvToTsv("id,name\n1,Alice");
// Output: "id\tname\n1\tAlice"

@uniconverter/csv-to-xml

import { csvToXml } from '@uniconverter/csv-to-xml';
const data = csvToXml("id,name\n1,Alice");
// Output: "<0><id>1</id><name>Alice</name></0>"

@uniconverter/csv-to-yaml

import { csvToYaml } from '@uniconverter/csv-to-yaml';
const data = csvToYaml("id,name\n1,Alice");
// Output: "- id: '1'\n  name: Alice\n"

JSON Converters

@uniconverter/json-to-csv

import { jsonToCsv } from '@uniconverter/json-to-csv';
const data = jsonToCsv([ { id: 1, name: 'Alice' } ]);
// Output: "id,name\n1,Alice"

@uniconverter/json-to-tsv

import { jsonToTsv } from '@uniconverter/json-to-tsv';
const data = jsonToTsv([ { id: 1, name: 'Alice' } ]);
// Output: "id\tname\n1\tAlice"

@uniconverter/json-to-xml

import { jsonToXml } from '@uniconverter/json-to-xml';
const data = jsonToXml({ user: { id: 1, name: 'Alice' } });
// Output: "<user><id>1</id><name>Alice</name></user>"

@uniconverter/json-to-yaml

import { jsonToYaml } from '@uniconverter/json-to-yaml';
const data = jsonToYaml({ user: { id: 1, name: 'Alice' } });
// Output: "user:\n  id: 1\n  name: Alice\n"

TSV Converters

@uniconverter/tsv-to-csv

import { tsvToCsv } from '@uniconverter/tsv-to-csv';
const data = tsvToCsv("id\tname\n1\tAlice");
// Output: "id,name\n1,Alice"

@uniconverter/tsv-to-json

import { tsvToJson } from '@uniconverter/tsv-to-json';
const data = tsvToJson("id\tname\n1\tAlice");
// Output: [ { id: '1', name: 'Alice' } ]

@uniconverter/tsv-to-xml

import { tsvToXml } from '@uniconverter/tsv-to-xml';
const data = tsvToXml("id\tname\n1\tAlice");
// Output: "<0><id>1</id><name>Alice</name></0>"

@uniconverter/tsv-to-yaml

import { tsvToYaml } from '@uniconverter/tsv-to-yaml';
const data = tsvToYaml("id\tname\n1\tAlice");
// Output: "- id: '1'\n  name: Alice\n"

XML Converters

@uniconverter/xml-to-csv

import { xmlToCsv } from '@uniconverter/xml-to-csv';
const data = xmlToCsv("<root><item><id>1</id><name>Alice</name></item></root>");
// Output: "id,name\n1,Alice"

@uniconverter/xml-to-json

import { xmlToJson } from '@uniconverter/xml-to-json';
const data = xmlToJson("<user><name>Alice</name></user>");
// Output: { user: { name: 'Alice' } }

@uniconverter/xml-to-tsv

import { xmlToTsv } from '@uniconverter/xml-to-tsv';
const data = xmlToTsv("<root><item><id>1</id><name>Alice</name></item></root>");
// Output: "id\tname\n1\tAlice"

@uniconverter/xml-to-yaml

import { xmlToYaml } from '@uniconverter/xml-to-yaml';
const data = xmlToYaml("<user><name>Alice</name></user>");
// Output: "user:\n  name: Alice\n"

YAML Converters

@uniconverter/yaml-to-csv

import { yamlToCsv } from '@uniconverter/yaml-to-csv';
const data = yamlToCsv("- id: 1\n  name: Alice");
// Output: "id,name\n1,Alice"

@uniconverter/yaml-to-json

import { yamlToJson } from '@uniconverter/yaml-to-json';
const data = yamlToJson("user:\n  name: Alice");
// Output: { user: { name: 'Alice' } }

@uniconverter/yaml-to-tsv

import { yamlToTsv } from '@uniconverter/yaml-to-tsv';
const data = yamlToTsv("- id: 1\n  name: Alice");
// Output: "id\tname\n1\tAlice"

@uniconverter/yaml-to-xml

import { yamlToXml } from '@uniconverter/yaml-to-xml';
const data = yamlToXml("user:\n  name: Alice");
// Output: "<user><name>Alice</name></user>"

License

MIT License. See LICENSE.md for more details.