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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@isk-insider/eve-paste

v1.0.2

Published

A node.js library for parsing copied and pasted data from EVE Online.

Readme

eve-paste

eve-paste is a Node.js library that parses copied and pasted data from EVE Online.

It was inspired by evepraisal/evepaste python library but uses a different parsing strategy that makes it a bit more flexible.

Features

  • Lightweight and Dependency-Free
    A minimal, efficient library with zero dependencies, ensuring fast performance and easy integration into any project.

  • Multiple Parsers
    Supports a variety of data types from EVE Online:

    • Inventory
    • Personal Assets
    • Contracts
    • Multibuy
  • Blueprint Handling
    Automatically excludes Blueprint Copies (BPCs), while parsing Blueprint Originals (BPOs) and Formulas.

  • Static Data Export (SDE)
    Seamlessly integrates fuzzwork's SDE for metadata resolution.

Install

npm i @isk-insider/eve-paste

Usage

Example

import { parser } from "@isk-insider/eve-paste";

const result = parser("Tritanium\t1");
console.log(result);
// => {
//      items: [{ type_id: 34, type_name: "Tritanium", quantity: 1 }],
//      failed_lines: []
//    }

API

parser(text_input)

Parses raw text_input into an array of items.

const input = "Tritanium\t1\nPyerite\t50\nInvalidLine\nTotal:\t4,50";
const result = parser(input);

console.log(result);
// => {
//      items: [
//        { type_id: 34, type_name: "Tritanium", quantity: 1 },
//        { type_id: 35, type_name: "Pyerite", quantity: 50 }
//      ],
//      failed_lines: ["InvalidLine", "Total:\t4,50"]
//    }

Returns:

  • items (Array): An array of parsed items with the structure:

    {
        "type_id": number,
        "type_name": string,
        "quantity": number
    }
  • failedLines (Array): An array of strings representing lines that could not be parsed.

Parameters

  • text_input (string): The raw text input to parse, typically copied from EVE Online.

tokenize(text_input)

Splits text_input into tokens for further processing. This method runs internally during parser but can be used independently for advanced cases.

const input = "Tritanium\t1\nPyerite\t50\nChromite: 1,200 m³\nTotal:\t4,50";
const result = tokenize(input);

console.log(result);
// => {
//      tokenized_items: [
//        { type_name: "Tritanium", quantity: 1 },
//        { type_name: "Pyerite", quantity: 50 },
//        { type_name: "Chromite", volume: 1200 },
//      ],
//      failed_lines: ["Total:\t4,50"]
//    }

The function performs a best-effort parsing by matching patterns from common scenarios. While it may not always achieve perfect accuracy by itself, it remains practical for the following use cases:

  • Preprocessing Data: Use this function to preprocess raw text data into structured tokens before further processing or querying.

  • Low-Latency Applications: When querying a database for appraisal data, you can bypass the additional lookup process performed by eve-paste and directly use the inferred type_name. This approach is particularly useful in low-latency applications.

Returns:

  • tokenized_items (Array): An array of parsed tokens with the structure:

    {
      "type_name": string,
      "quantity"?: number,
      "volume"?: number
    }

    quantity and volume are optional fields and will only be included if they can be inferred from the input data. If neither is parsed, the line will be marked as failed.

  • failed_lines (Array): Lines that could not be tokenized.

Parameters

  • text_input (string): The raw text input to parse, typically copied from EVE Online.

lookup(type_name)

Search for metadata associated with a given type_name in the invTypes SDE. This method is used internally by the parser but can also be invoked independently for advanced use cases.

The lookup table can be quite large (~1.4 MB), as it includes all published items from EVE Online.

const typeName = "tritanium";
const result = lookup(typeName);

console.log(result);
// => { type_name: "Tritanium", type_id: 34, type_volume: 0.01 }

Returns:

{
  "type_name"?: string,
  "type_id"?: number,
  "type_volume"?: number, // repackaged volume of each unit (m³)
}

If no match is found, an empty object is returned.

Parameters

  • type_name (string): The item name to look up.

Notes

  • The output format aligns with Python-style conventions, making integration with tools like ESI or EveRef seamless.