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

@noonlight/noonlight-sdk

v0.1.2

Published

A Node.js wrapper around the Noonlight API

Readme

Noonlight SDK - Node.js Client Library

A Node.js wrapper around the Noonlight API. This library is part of the Noonlight SDK.

Installation

npm i @noonlight/noonlight-sdk

Usage

let access_token = 'eyJ0...' // acquire an access_token from Noonlight OAuth

const Noonlight = require('@noonlight/noonlight-sdk') // require the module
const nl = new Noonlight(access_token) // initialize

// Call methods
nl.createAlarm(nl.services(), '911 Washington Ave, St. Louis, MO, 63101')

Reference

constructor(token: string, uri?: string)
You can initialize the library by instantiating the base class using the new keyword. The token parameter is the access_token required to make requests to the Noonlight API and is hence a required parameter. The base URL for the API will be derived from the token if available. In case of error, make sure that you provided a valid token or explicitly provide the API base URL as the second parameter.

Example Usage:

// Implicit URI detection
const nl = new noonlight('eyJ0...')

//Explicit URI declaration
const nl = new noonlight('eyJ0...', 'http://localhost:3000')

services(code?: string)
Generates a Services object based on a given code, in the required JSON format to be used in other methods. The services are Police, Fire and Medical. The code parameter could be any combination of their initials in any order. It is also case insensitive. By default, the service object returned has police set to true.

Example Usage:

console.log(nl.services())
// Output: { police: true, fire: false, medical: false }

console.log(nl.services('PF'))
// Output: { police: true, fire: true, medical: false }

nl.services('mf')
// Output: { police: false, fire: true, medical: true }

nl.services('FpM')
// Output: { police: true, fire: true, medical: true }

createAlarm(services: Services{}, ...location: ...number|string)
Creates a Noonlight alarm based on the given location and services. The Services object required by the services parameter can be generated using the services() method. For the location, you can either pass in an address string in the format:
line1, line2 (optional), city, state (2-digit state code), zip
or,
the coordinates as three separate numbers - latitude, longitude and accuracy in that order. Improper or invalid parameters will result in an error. The method returns a Promise which gets resolved into the response from the Noonlight API in event of successful alarm creation. The Promise will be rejected with an Error object in event of an error.

Example Usage:

// Alarm creation with address
nl.createAlarm(nl.services(), '911 Washington Ave, St. Louis, MO, 63101')
  .then(result =>  console.log(result))
  .catch(err => console.log(err.message))

// Alarm creation with coordinates
nl.createAlarm(nl.services(), 34.32334, -117.3343, 5)
  .then(result =>  console.log(result))
  .catch(err => console.log(err.message))

Contributions

Currently, public contributions to this project are not being accepted.