Package Exports
- @aneuhold/core-ts-api-lib
- @aneuhold/core-ts-api-lib/browser
- @aneuhold/core-ts-api-lib/node
Readme
Personal Core API Library
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.
- Add the required JSR configuration to a
.npmrcfile if not there already:@jsr:registry=https://npm.jsr.io - 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);
}