@jcbhmr/ungh
v1.0.4
Published
๐ ungh.cc API client for JavaScript
Readme
ungh.cc client
๐ ungh.cc API client for JavaScript
import { Ungh } from "@jcbhmr/ungh";
const ungh = new Ungh({
userAgent: "awesomeapp",
});
const { data } = await ungh.rest.repos.getLatestRelease({
owner: "nodejs",
repo: "node",
});
console.log("The latest version of Node.js is %s.", data.tag_name);๐ค Small. Only ~3 KiB.
๐ฆ TypeScript types for return values
๐ octokit-ish API
Installation
npm install @jcbhmr/unghUsage
import { Octokit } from "octokit";
import { Ungh } from "@jcbhmr/ungh";
const octokit = new Octokit({ auth: "<github_pat>" });
const { data } = await octokit.rest.repos.get({ owner: "nodejs", repo: "node" });
console.log(data); // More data. Full GitHub API response.
const ungh = new Ungh();
const { data } = await ungh.rest.repos.get({ owner: "nodejs", repo: "node" });
console.log(data); // Less data. Trimmed & cached GitHub API response.Development
Get started using Vite+.
vp installvp testvp pack