JSPM

  • Created
  • Published
  • Downloads 510
  • Score
    100M100P100Q95471F
  • License MIT

A library for interacting with the backend and defining the backend API for personal projects.

Package Exports

  • @aneuhold/core-ts-api-lib

Readme

Personal Core API Library

JSR NPM

A library for interacting with the backend and defining the backend API for personal projects.

📦 Installation

To add to a repo, follow the instructions below for your environment:

For Node using NPM

Run pnpm add @aneuhold/core-ts-api-lib

For Node using JSR

The below instructions still allow for things like Renovate to work, and normal commands with pnpm such as pnpm up.

  1. Add the required JSR configuration to a .npmrc file if not there already:
    @jsr:registry=https://npm.jsr.io
  2. Add the package with pnpm add @jsr/aneuhold__core-ts-api-lib

For Deno

Run deno add jsr:@aneuhold/core-ts-api-lib

🟢 Usage

Pull in one of the services and use it like so:

import { APIService } from '@aneuhold/core-ts-api-lib';
// If using Node with JSR
// import { APIService } from '@jsr/aneuhold__core-ts-api-lib';

export default async function validateUser() {
  const userInfo = await APIService.validateUser({
    username: 'user',
    password: 'pass'
  });
  console.log(userInfo);
}

See full documentation on usage at JSR!