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

@openrailuk/referencedata

v2.0.4

Published

A package for accessing the the UK National Rails reference data FTP server as well as some helper functions to process and use the reference data

Downloads

103

Readme

country license npm (scoped) status pipeline coverage slack

A package for accessing the the UK National Rails reference data FTP server as well as some helper functions to process and use the reference data

info

This repository is hosted on GitLab as reference-nodejs. The GitHub repository is a downstream repository where all changes from GitLab are pushed. Please raise any issues or pull requests on the GitLab repository.

installation

  1. install npm
  2. npm install @openrailuk/referencedata --save

table of contents

getting started

this package downloads and parses the xml reference data from the National Rail ftp server and parses into JSON for use on a Node.JS application. The package also provide some helper functions for retrieving the reference data.

the reference data contains information about locations, train operating companies, reason codes, and daily timetables among other information for the UK rail network.

to use @openrailuk/referencedata you first need to supply the ftp password for your account found on the my feeds section of the National Rail Data Portal

const { referenceData } = require('@openrailuk/referencedata');

referenceData.connect('ftpUserPassword');

a simple example of getting the v3 reference data:

const { referenceData } = require('@openrailuk/referencedata');

referenceData.connect('ftpUserPassword');
referenceData.on('dataReady', () => {
  referenceData.getCurrentV3()
    .then((v3RefData) => {
      console.log(v3RefData);
    })
    .catch((err) => {
      console.log(err);
    });
});

package docs

code docs found here

dev notes

Hi :D

this package is being coded while im experimenting so feel free to use it however it may change at any moment. I'm publishing it as i go so not all features will be there.

I'm generaly only working on this while im sat on the train too and from my day job so this may take a while