Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bryan-hoang/aoc-client

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bryan-hoang/aoc-client

An Advent of Code client library

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
97
decreased by-51.74%
Maintainers
1
Weekly downloads
 
Created
Source

@bryan-hoang/aoc-client

npm version npm downloads bundle size license

standard-readme compliant

A TS library for Advent of Code.

It was primarily developed to build the @bryan-hoang/aoc-cli command-line tool, but it can also be integrated into other projects.

Table of Contents

Install

# ✨ Auto-detect
npx nypm install @bryan-hoang/aoc-client

# npm
npm install @bryan-hoang/aoc-client

# yarn
yarn add @bryan-hoang/aoc-client

# pnpm
pnpm install @bryan-hoang/aoc-client

# bun
bun install @bryan-hoang/aoc-client

# deno
deno install @bryan-hoang/aoc-client

Usage

Importing:

ESM (Node.js, Bun, Deno)

import { AocClientBuilder, AocClient } from "@bryan-hoang/aoc-client";

CommonJS (Legacy Node.js)

const { AocClientBuilder, AocClient } = require("@bryan-hoang/aoc-client");

CDN (Deno, Bun and Browsers)

import {
  AocClientBuilder,
  AocClient,
} from "https://esm.sh/@bryan-hoang/aoc-client";

API:

:factory: AocClientBuilder

Methods

:gear: buildClient
MethodType
buildClient() => AocClient
:gear: #validateBuild
MethodType
#validateBuild() => asserts this is this and { _sessionCookie: string; _year: number; _day: number; }
:gear: getSessionCookieFromDefaultLocations
MethodType
getSessionCookieFromDefaultLocations() => AocClientBuilder
:gear: getSessionCookieFromFile
MethodType
getSessionCookieFromFile(file: string) => AocClientBuilder
:gear: getDefaultSessionCookieFile
MethodType
getDefaultSessionCookieFile() => string
:gear: sessionCookie
MethodType
sessionCookie(sessionCookie: string) => AocClientBuilder
:gear: year
MethodType
year(year: number) => AocClientBuilder
:gear: day
MethodType
day(day: number) => AocClientBuilder
:gear: latestPuzzleDay
MethodType
latestPuzzleDay() => AocClientBuilder
:gear: latestEventYear
MethodType
latestEventYear() => AocClientBuilder
:gear: overwriteFiles
MethodType
overwriteFiles(overwriteFiles: boolean) => AocClientBuilder

:factory: AocClient

Methods

:gear: getBuilder
MethodType
getBuilder() => AocClientBuilder
:gear: ensureDayUnlocked
MethodType
ensureDayUnlocked() => void
:gear: isDayUnlocked
MethodType
isDayUnlocked() => boolean

Maintainers

@bryan-hoang

Contributing

PRs accepted.

Small note: if editing the README, please conform to the standard-readme specification.

License

MIT © 2024 Bryan Hoang


🤖 auto updated with automd

FAQs

Package last updated on 16 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc