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

starlight-api

v1.0.2

Published

Starlight Programming Language API Utilities with GET, POST, headers, and auth

Readme

Starlight API Utilities

Developer: Dominex

Description: Starlight API Utilities provide a low-level and flexible HTTP client for the Starlight Programming Language. It supports HTTP and HTTPS requests with JSON handling, headers, authentication, query parameters, timeouts, and reusable API clients.

This package is designed as a foundation utility for building integrations, bots, services, and automation tools with clean and minimal code.

Installation

npm install starlight-api

Import

import api from "starlight-api"

Or using named imports:

import { request, createClient } from "starlight-api"

Basic GET Request

` const response = await api.request({ url: "https://example.com/data" })

print(response.data) `

POST Request with JSON Body

` const response = await api.request({ method: "POST", url: "https://example.com/api", body: { name: "Starlight", version: "1.0.0" } })

print(response.data) `

JSON bodies are automatically converted and parsed.

Query Parameters

const response = await api.request({ url: "https://example.com/search", params: { q: "starlight", page: 1 } })

Custom Headers

const response = await api.request({ url: "https://example.com/secure", headers: { "X-Token": "abc123" } })

Basic Authentication

const response = await api.request({ url: "https://example.com/private", auth: { username: "user", password: "pass" } })

Timeout Control

const response = await api.request({ url: "https://example.com/slow", timeout: 5000 })

Default timeout is 15000 milliseconds.

Using createClient

The createClient function allows you to create a reusable API client with default settings.

` const client = createClient({ baseURL: "https://api.example.com", headers: { "Authorization": "Bearer TOKEN" } })

const users = await client.get("/users") const post = await client.post("/posts", { title: "Hello" }) `

Client Methods

  • client.request(method, path, options) - client.get(path, options) - client.post(path, body, options) - client.put(path, body, options) - client.patch(path, body, options) - client.delete(path, options)

Request Options

  • method – HTTP method (default GET) - url – Full request URL - headers – Custom HTTP headers - body – Request body (object, string, or buffer) - params – Query parameters object - auth – Basic authentication - timeout – Timeout in milliseconds

Response Object

Every request returns an object with:

  • ok – Boolean success status - status – HTTP status code - statusText – HTTP status message - headers – Response headers - data – Parsed response data - raw – Raw response text

Notes

  • Supports HTTP and HTTPS - No external dependencies - JSON handled automatically - Designed for advanced workflows with minimal code - Ideal base for services, bots, and integrations Official Documentation