age-ts
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

Age.ts

This is a simple NextJs component that calculates your age.

Installation

Install the package via npm:

npm install age-ts

pnpm:

pnpm i age-ts

or yarn:

yarn add age-ts

Usage

Import the Age component and use it in your NextJS application:

"use-client";

import Age from "age-ts";

function App() {
  return <Age />;
}

export default App;

Environment Variable

Set the BIRTHDATE environment variable in the following format:

NEXT_PUBLIC_BIRTHDATE = '<your birthdate here>'

Or just pass the birthdate argument through the component like this:

"use-client";

import Age from "age-ts";

function App() {
  return <Age birthdate='01-01-2001' />;
}

export default App;

Package Sidebar

Install

npm i age-ts

Weekly Downloads

1

Version

2.0.1

License

MIT

Unpacked Size

12.8 kB

Total Files

9

Last publish

Collaborators

  • gamelord2011