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 🙏

© 2024 – Pkg Stats / Ryan Hefner

bangla-support

v2.0.0

Published

A collection of utility functions to provide bangla digit, bangla date, text translate into bangla and verify bangla digit e.t.c.

Downloads

163

Readme

bangla-support

A collection of utility functions to provide bangla date, bangla digit, text translate into bangla and verify bangla digit e.t.c.

Installation and Usage

Install using npm:

$ npm install bangla-support

Then use it in your app like this:

import {getBanglaDigit, isBanglaDigit} from 'bangla-support'

console.log(getBanglaDigit(1234567890)) // Output: ১২৩৪৫৬৭৮৯০
console.log(isBanglaDigit('১২৩৪৫৬৭৮৯০')) // Output: true

Functions

getBanglaDigit

Return bangla digit of a number or string. Or return an array of bangla digit if you doesn't pass anything.

import {getBanglaDigit} from 'bangla-support'
getBanglaDigit(1234567890) // Output: ১২৩৪৫৬৭৮৯০
getBanglaDigit() // Output: ['০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯']

isBanglaDigit

Return true if the input is a bangla digit. Otherwise return false.

import {isBanglaDigit} from 'bangla-support'

isBanglaDigit('১২৩৪৫৬৭৮৯০') // Output: true
isBanglaDigit('1234567890') // Output: false

getBanglaDate

Return bangla date in a string for a given date. Or return the current date if you don't pass date.

import {getBanglaDate} from 'bangla-support'

getBanglaDate() // Output: 'শুক্রবার, ৯ কার্তিক, ১৪৩১'

// Pass any date formate such as '2024-10-25', 'October 25 2024 18:32:03', '2024-10-25T18:32:03' e.t.c.
const date = new Date('October 25 2024 18:32:03')

getBanglaDate(date) // Output: 'শুক্রবার, ৯ কার্তিক, ১৪৩১'
getBanglaDate(date, {format: 'DD/MM/YY', country: 'BD'}) // Output: '০৯/০৭/৩১'
getBanglaDate(date, {format: 'DD/MM/YYYY', country: 'BD'}) // Output: '০৯/০৭/১৪৩১'
getBanglaDate(date, {format: 'DD/MM/YYYYb', country: 'BD'}) // Output: ০৯/০৭/১৪৩১ (বঙ্গাব্দ)
getBanglaDate(date, {format: 'D MMMM, YYYY', country: 'BD'}) // Output: '৯ কার্তিক, ১৪৩১'
getBanglaDate(date, {format: 'D MMMM, YYYYb', country: 'BD'}) // Output: ৯ কার্তিক, ১৪৩১ (বঙ্গাব্দ)

getBanglaDay

Documention is coming soon.

getBanglaDayName

Documention is coming soon.

getBanglaDays

Return bangla week days in an array.

import {getBanglaDays} from 'bangla-support'

getBanglaDays() // Output: ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'শুক্র', 'শনি']

getBanglaMonth

Documention is coming soon.

getBanglaMonths

Return bangla months in an array.

import {getBanglaMonths} from 'bangla-support'

getBanglaMonths() // Output: ['বৈশাখ', 'জ্যৈষ্ঠ', 'আষাঢ়', 'শ্রাবণ', 'ভাদ্র', 'আশ্বিন', 'কার্তিক', 'অগ্রহায়ণ', 'পৌষ', 'মাঘ', 'ফাল্গুন', 'চৈত্র']

getBanglaSeason

Documention is coming soon.

getBanglaSeasons

Return bangla seasons in an array.

import {getBanglaSeasons} from 'bangla-support'

getBanglaSeasons() // Output: ['গ্রীষ্ম', 'বর্ষা', 'শরৎ', 'হেমন্ত', 'শীত', 'বসন্ত']

getBanglaYear

Documention is coming soon.