Skip to content

GameLord2011/age-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;

About

An npm package that calculates age

Resources

License

Stars

Watchers

Forks

Packages

No packages published