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

get-full-year

v0.0.3

Published

An unofficial client for getfullyear.com

Downloads

10

Readme

get-full-year 🗓️

npm version License: ISC

An unofficial TypeScript client for getfullyear.com that helps you get the full year. Because sometimes you just need to know what year it is, and you need to know it properly.

🚀 Features

  • Written in TypeScript with full type definitions
  • Zero dependencies
  • Supports both ESM and CommonJS
  • Tiny bundle size
  • Simple, clean API
  • Promise-based for modern JavaScript applications

📦 Installation

Using npm:

npm install get-full-year

Using yarn:

yarn add get-full-year

Using pnpm:

pnpm add get-full-year

🔨 Usage

ESM

import getFullYear from "get-full-year";

// Using async/await
const main = async () => {
  const data = await getFullYear();
  console.log(data);
};

// Using promises
getFullYear().then((data) => {
  console.log(data);
});

CommonJS

const getFullYear = require("get-full-year").default;

getFullYear().then((data) => {
  console.log(data);
});

🔍 API Reference

getFullYear(isEnterprise?: boolean)

Makes a sophisticated request to getfullyear.com's API to fetch the current year data, with optional enterprise mode support.

Parameters:

  • isEnterprise (optional): boolean - Enables enterprise mode, suppressing sponsorship messages

Returns: Promise<YearResponseDTO> - A promise that resolves with the year data.

Throws: YearFetchingError - When the temporal data acquisition fails

Types:

interface YearResponseDTO {
  year: number;
  sponsored_by?: string;
  metadata?: Record<string, unknown>;
}

Example:

// Standard mode
const yearData = await getFullYear();
console.log(yearData.year); // 2024

// Enterprise mode
const enterpriseData = await getFullYear(true);

Error Handling:

try {
  const yearData = await getFullYear();
} catch (error) {
  if (error instanceof YearFetchingError) {
    console.error("Failed to acquire year:", error.message);
  }
}

🏗️ Project Structure

get-full-year/
├── src/           # Source code
├── dist/          # Compiled output
│   ├── esm/      # ES Modules
│   └── commonjs/  # CommonJS modules
├── example/       # Usage examples
└── .tshy/        # TypeScript build configuration

🛠️ Development

  1. Clone the repository
git clone https://github.com/threepointone/get-full-year.git
  1. Install dependencies
npm install
  1. Build the project
npm run prepare

📝 TypeScript Configuration

This project uses tshy for TypeScript builds, supporting both ESM and CommonJS output formats. The TypeScript configuration is split across multiple files:

  • tsconfig.json: Base TypeScript configuration
  • .tshy/build.json: Shared build configuration
  • .tshy/esm.json: ESM-specific configuration
  • .tshy/commonjs.json: CommonJS-specific configuration

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

📄 License

This project is licensed under the ISC License - see the LICENSE file for details.

👤 Author

Sunil Pai

🙏 Acknowledgments

  • Thanks to getfullyear.com for providing this essential service
  • The TypeScript team for making type-safe JavaScript possible
  • The open-source community for continuous inspiration

📊 Stats

GitHub stars npm downloads


Made with ❤️ and probably too much coffee ☕️