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

1.1.1 • Public • Published

Névnap

Nevnap (névnap) is a minimalist JavaScript library that displays hungarian namedays.

  • 🔌 No dependencies
  • ↔️ No XHR
  • 📦 Only 13.9kB (including names)

The names used in this package are from Wikipedia.

Installation

npm i nevnap

or

yarn add nevnap

Browser (UMD)

<!-- CDN example (unpkg) -->
<script src="https://unpkg.com/nevnap@latest"></script>

<script>
	nevnap.today();
</script>

API

Methods

today(): string[]

Getting today's nameday(s).

import { today } from 'nevnap';

today(); // ['Zsuzsanna', 'Eliza', 'Konrád']

tomorrow(): string[]

Getting tomorrow's nameday(s).

import { tomorrow } from 'nevnap';

tomorrow(); // ['Aladár', 'Álmos', 'Leó']

on(date: string): string[]

Getting nameday(s) on a specific date.

import { on } from 'nevnap';

on('04-22'); // ['Csilla', 'Noémi', 'Kájusz', 'Noé']

to(name: string): string[]

Getting date(s) to a specific name.

import { to } from 'nevnap';

to('Csilla'); // ['04-22', '08-10']

Package Sidebar

Install

npm i nevnap

Weekly Downloads

8

Version

1.1.1

License

MIT

Unpacked Size

19.5 kB

Total Files

6

Last publish

Collaborators

  • nevadavid