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

@leiden-js/transformation-service

v1.0.6

Published

JSON API service for transformation between Leiden+ (or Leiden Translation) and EpiDoc XML

Readme

@leiden-js/transformation-service

Part of leiden-js, a set of packages for working with the Leiden notation systems used in epigraphic digital editing within JavaScript environments.

REST API service for bidirectional transformation between Leiden notation and XML.

Installation & Usage

As a standalone service

# Install globally from NPM
npm install -g @leiden-js/transformation-service

# Start the service
leiden-transformation-service

# Show available options
leiden-transformation-service --help

# Run on a specific port and host
leiden-transformation-service --port 8080 --host 127.0.0.1

The service will be available at http://localhost:8080 (or whatever port you specify).

In a Node.js application

# Install as a dependency
npm install @leiden-js/transformation-service
import { startServer } from '@leiden-js/transformation-service';

// Start with custom port and host
const server = startServer(8080, '127.0.0.1');

// Stop the server when needed
server.close();

For development or testing

# From root of the monorepo
pnpm install

# Run the service (from this package directory)
pnpm start

# Development server with auto-restart
pnpm dev

By default, the service runs on port 3000 or the port specified in the PORT environment variable.

API Documentation

API documentation is available at the /api-docs endpoint when the service is running.

Endpoints

| Method | Endpoint | Description | |--------|----------------------------------|---------------------------------------| | GET | / | API information | | POST | /transform/leiden-plus/to-xml | Convert Leiden+ to XML | | POST | /transform/xml/to-leiden-plus | Convert XML to Leiden+ | | POST | /transform/leiden-trans/to-xml | Convert Leiden Trans to XML | | POST | /transform/xml/to-leiden-trans | Convert XML to Leiden Trans |

Request Format

{
  "content": "The content to transform",
  "topNode": "Document" // Optional, defaults to "Document"
}

The topNode parameter is only available for Leiden-to-XML transformations.

Response Format

Successful response:

{
  "success": true,
  "content": "Transformed content",
  "parseErrors": [] // Optional array of non-fatal parsing errors
}

Error response:

{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "Error message",
    "details": {} // Optional error-specific details
  }
}

Related Packages