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 🙏

© 2024 – Pkg Stats / Ryan Hefner

EVEoj

v0.3.1

Published

EVE Online JS library for JSON static data (SDE) and formulas

Downloads

24

Readme

EVEoj

The EVEoj project provides a simple way to access EVE static data and formulas for mechanics in JS. It can be used as a Node.js module or directly in a web browser (including full IGB support).

See the project website for additional details and API documentation.

Getting Started

Node.js

Download the latest JSON-converted static data from the project website. Extract these files to a local path that your Node.js project can access.

Install the EVEoj package dependency for your project with npm install EVEoj --save.

In your Node.js application, use the following code to point EVEoj at the static data you downloaded.

var EVEoj = require("EVEoj");
var SDD = EVEoj.SDD.Create("json", {path: "/path/to/the/static/data"});

Web Browser

Load jQuery and the EVEoj library into your web browser. If you are using the IGB, you MUST use the 1.x branch of jQuery.

<script src="//cf.eve-oj.com/js/jquery-1.12.4.min.js"></script>
<script src="//cf.eve-oj.com/js/EVEoj-0.3.0.min.js"></script>

In your custom JS, use the following code to point EVEoj at a hosted version of the static data (where ver is the latest version of the CDN hosted data):

var SDD = EVEoj.SDD.Create("json", {path: "//cf.eve-oj.com/sdd/" + ver});

Simple typeID Example

Once you have the library loaded and your SDD object is created, your code is the same whether in Node.js or using a browser.

As an example, the following snippet uses Underscore and EVEoj to print out the ID of the "Skill Injector" item. This example assumes that the Underscore library has been loaded into the _ variable (using either a script tag in your HTML or via require in Node.js).

SDD.LoadMeta()
.then(function(arg)) {
    return arg.source.GetTable("invTypes").Load();
})
.then(function(arg)) {
    var tbl = arg.table;
    var row = _.find(tbl.data, tbl.ColPred("typeName", "===", "Skill Injector"));
    console.info("Skill Injector type ID: " + row[tbl.colmap.typeID]);
})
.caught(function(err) {
    console.error(err);
});

Reference the Core API for more information about what you can do with SDD.

A Note on Promises

EVEoj's asynchronous loads use the Promise architecture. In particular, EVEoj uses the bluebird promise implementation in both Node.js and in the browser. The browserified version of EVEoj hosted on the CDN has an embedded version of bluebird so you do not need to include it explicity in your HTML.

The full JS bundle available at project downloads includes a non-minified version of EVEoj. This version does NOT include the embedded bluebird library. Be sure to include a recent version of bluebird JS in your HTML if you use this version. This can be useful for local debugging and development, or to save a bit of bandwidth on your production site if it already uses a version of bluebird.