bn-calendar 1.2.4 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
 
18
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/primitives-Djsevc69.mjs
18
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/primitives-Djsevc69.mjs
19
19
  /**
20
20
  * Copyright 2026 - present Nazmul Hassan
21
21
  *
@@ -65,7 +65,7 @@ function isNonEmptyString(value) {
65
65
  }
66
66
 
67
67
  //#endregion
68
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/constants-ZyfpysiQ.mjs
68
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/constants-ZyfpysiQ.mjs
69
69
  /** * Bangla digits from `০-৯` mapped against `0-9` */
70
70
  const BN_DIGITS = /* @__PURE__ */ Object.freeze({
71
71
  "০": 0,
@@ -81,7 +81,7 @@ const BN_DIGITS = /* @__PURE__ */ Object.freeze({
81
81
  });
82
82
 
83
83
  //#endregion
84
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/specials-Cye93-uo.mjs
84
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/specials-krf7zsqI.mjs
85
85
  /**
86
86
  * Copyright 2026 - present Nazmul Hassan
87
87
  *
@@ -128,7 +128,7 @@ function isObjectWithKeys(value, keys) {
128
128
  * @returns `true` if the value is a valid date string, otherwise `false`.
129
129
  */
130
130
  function isDateString(value) {
131
- return isString(value) && !isNaN(Date.parse(value));
131
+ return isString(value) && !Number.isNaN(Date.parse(value));
132
132
  }
133
133
  /**
134
134
  * * Type guard to check if a value is a string representing a finite number.
@@ -145,7 +145,7 @@ function isNumericString(value) {
145
145
  }
146
146
 
147
147
  //#endregion
148
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/utilities-B9axOvOX.mjs
148
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/utilities-CmPwOkdy.mjs
149
149
  /**
150
150
  * Copyright 2026 - present Nazmul Hassan
151
151
  *
@@ -174,7 +174,7 @@ function normalizeNumber(num) {
174
174
  }
175
175
 
176
176
  //#endregion
177
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/index.mjs
177
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/index.mjs
178
178
  /**
179
179
  * Copyright 2026 - present Nazmul Hassan
180
180
  *
@@ -215,7 +215,7 @@ function normalizeNumber(num) {
215
215
  function banglaToDigit(bnDigit, forceNumber = true) {
216
216
  if (!isNonEmptyString(bnDigit)) return forceNumber ? NaN : "";
217
217
  const digitStr = bnDigit.replace(/[০১২৩৪৫৬৭৮৯]/g, (d) => String(BN_DIGITS[d]));
218
- if (forceNumber) return Number(digitStr.split("").filter((dig) => !isNaN(Number(dig))).join(""));
218
+ if (forceNumber) return Number(digitStr.split("").filter((dig) => !Number.isNaN(Number(dig))).join(""));
219
219
  return digitStr;
220
220
  }
221
221
  /**
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/primitives-Djsevc69.mjs
17
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/primitives-Djsevc69.mjs
18
18
  /**
19
19
  * Copyright 2026 - present Nazmul Hassan
20
20
  *
@@ -64,7 +64,7 @@ function isNonEmptyString(value) {
64
64
  }
65
65
 
66
66
  //#endregion
67
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/constants-ZyfpysiQ.mjs
67
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/constants-ZyfpysiQ.mjs
68
68
  /** * Bangla digits from `০-৯` mapped against `0-9` */
69
69
  const BN_DIGITS = /* @__PURE__ */ Object.freeze({
70
70
  "০": 0,
@@ -80,7 +80,7 @@ const BN_DIGITS = /* @__PURE__ */ Object.freeze({
80
80
  });
81
81
 
82
82
  //#endregion
83
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/specials-Cye93-uo.mjs
83
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/specials-krf7zsqI.mjs
84
84
  /**
85
85
  * Copyright 2026 - present Nazmul Hassan
86
86
  *
@@ -127,7 +127,7 @@ function isObjectWithKeys(value, keys) {
127
127
  * @returns `true` if the value is a valid date string, otherwise `false`.
128
128
  */
129
129
  function isDateString(value) {
130
- return isString(value) && !isNaN(Date.parse(value));
130
+ return isString(value) && !Number.isNaN(Date.parse(value));
131
131
  }
132
132
  /**
133
133
  * * Type guard to check if a value is a string representing a finite number.
@@ -144,7 +144,7 @@ function isNumericString(value) {
144
144
  }
145
145
 
146
146
  //#endregion
147
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/utilities-B9axOvOX.mjs
147
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/utilities-CmPwOkdy.mjs
148
148
  /**
149
149
  * Copyright 2026 - present Nazmul Hassan
150
150
  *
@@ -173,7 +173,7 @@ function normalizeNumber(num) {
173
173
  }
174
174
 
175
175
  //#endregion
176
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/index.mjs
176
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/index.mjs
177
177
  /**
178
178
  * Copyright 2026 - present Nazmul Hassan
179
179
  *
@@ -214,7 +214,7 @@ function normalizeNumber(num) {
214
214
  function banglaToDigit(bnDigit, forceNumber = true) {
215
215
  if (!isNonEmptyString(bnDigit)) return forceNumber ? NaN : "";
216
216
  const digitStr = bnDigit.replace(/[০১২৩৪৫৬৭৮৯]/g, (d) => String(BN_DIGITS[d]));
217
- if (forceNumber) return Number(digitStr.split("").filter((dig) => !isNaN(Number(dig))).join(""));
217
+ if (forceNumber) return Number(digitStr.split("").filter((dig) => !Number.isNaN(Number(dig))).join(""));
218
218
  return digitStr;
219
219
  }
220
220
  /**
package/dist/index.cjs CHANGED
@@ -15,9 +15,9 @@
15
15
  */
16
16
 
17
17
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
18
- const require_dist = require('./dist-BasKGWW6.cjs');
18
+ const require_dist = require('./dist-2u-Hm2TM.cjs');
19
19
 
20
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/guards-DEcnNbI5.mjs
20
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/guards-DBunDnng.mjs
21
21
  /**
22
22
  * * Checks if the year is a leap year.
23
23
  *
@@ -417,7 +417,7 @@ var BanglaCalendar = class BanglaCalendar {
417
417
  constructor(dateBnYrOrCfg, bnMonthOrCfg, bnDateOrCfg, config) {
418
418
  this.variant = this.#processVariants(dateBnYrOrCfg, bnMonthOrCfg, bnDateOrCfg, config);
419
419
  let date = dateBnYrOrCfg instanceof Date ? dateBnYrOrCfg : new Date(require_dist.isDateString(dateBnYrOrCfg) && !BanglaCalendar.isBanglaDateString(dateBnYrOrCfg) ? dateBnYrOrCfg : require_dist.isNumber(dateBnYrOrCfg) && !BanglaCalendar.isBanglaYearEn(dateBnYrOrCfg) ? dateBnYrOrCfg : Date.now());
420
- if (isNaN(date.getTime())) date = /* @__PURE__ */ new Date();
420
+ if (Number.isNaN(date.getTime())) date = /* @__PURE__ */ new Date();
421
421
  const { year, month, monthDate } = this.#processDate(date);
422
422
  let bnYear = BanglaCalendar.isBanglaYear(dateBnYrOrCfg) ? require_dist.banglaToDigit(dateBnYrOrCfg) : require_dist.isNumber(dateBnYrOrCfg) && BanglaCalendar.isBanglaYearEn(dateBnYrOrCfg) ? dateBnYrOrCfg : year;
423
423
  let bnMonth = BanglaCalendar.isBanglaMonth(bnMonthOrCfg) ? require_dist.banglaToDigit(bnMonthOrCfg) : BanglaCalendar.isBanglaMonthEn(bnMonthOrCfg) ? bnMonthOrCfg : month;
package/dist/index.d.cts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { a as Enumerate, s as NumberRange } from "./object-D70hzkoY-JjxsmDJd.cjs";
18
- import { _ as BnCalendarConfig, a as $BnEn, c as BanglaDate, f as BanglaDayName, g as BanglaYear, h as BanglaSeasonName, l as BanglaDateFormat, m as BanglaMonthName, p as BanglaMonth, v as BnCalendarVariant } from "./types-BKGg1Ls7.cjs";
17
+ import { a as Enumerate, s as NumberRange } from "./object-DyVg8BFt-DFzPgPEP.cjs";
18
+ import { _ as BnCalendarConfig, a as $BnEn, c as BanglaDate, f as BanglaDayName, g as BanglaYear, h as BanglaSeasonName, l as BanglaDateFormat, m as BanglaMonthName, p as BanglaMonth, v as BnCalendarVariant } from "./types-BhqpTl07.cjs";
19
19
 
20
20
  //#region src/BanglaCalendar.d.ts
21
21
  /**
package/dist/index.d.mts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { a as Enumerate, s as NumberRange } from "./object-D70hzkoY-JjxsmDJd.mjs";
18
- import { _ as BnCalendarConfig, a as $BnEn, c as BanglaDate, f as BanglaDayName, g as BanglaYear, h as BanglaSeasonName, l as BanglaDateFormat, m as BanglaMonthName, p as BanglaMonth, v as BnCalendarVariant } from "./types-CdJOp5Bk.mjs";
17
+ import { a as Enumerate, s as NumberRange } from "./object-DyVg8BFt-DFzPgPEP.mjs";
18
+ import { _ as BnCalendarConfig, a as $BnEn, c as BanglaDate, f as BanglaDayName, g as BanglaYear, h as BanglaSeasonName, l as BanglaDateFormat, m as BanglaMonthName, p as BanglaMonth, v as BnCalendarVariant } from "./types-CuBrWmN0.mjs";
19
19
 
20
20
  //#region src/BanglaCalendar.d.ts
21
21
  /**
package/dist/index.mjs CHANGED
@@ -14,9 +14,9 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { a as isObjectWithKeys, c as isNumber, i as isDateString, n as digitToBangla, o as isInteger, r as normalizeNumber, s as isNonEmptyString, t as banglaToDigit } from "./dist-BSh0fQzq.mjs";
17
+ import { a as isObjectWithKeys, c as isNumber, i as isDateString, n as digitToBangla, o as isInteger, r as normalizeNumber, s as isNonEmptyString, t as banglaToDigit } from "./dist-CL82Iohb.mjs";
18
18
 
19
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/guards-DEcnNbI5.mjs
19
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/guards-DBunDnng.mjs
20
20
  /**
21
21
  * * Checks if the year is a leap year.
22
22
  *
@@ -416,7 +416,7 @@ var BanglaCalendar = class BanglaCalendar {
416
416
  constructor(dateBnYrOrCfg, bnMonthOrCfg, bnDateOrCfg, config) {
417
417
  this.variant = this.#processVariants(dateBnYrOrCfg, bnMonthOrCfg, bnDateOrCfg, config);
418
418
  let date = dateBnYrOrCfg instanceof Date ? dateBnYrOrCfg : new Date(isDateString(dateBnYrOrCfg) && !BanglaCalendar.isBanglaDateString(dateBnYrOrCfg) ? dateBnYrOrCfg : isNumber(dateBnYrOrCfg) && !BanglaCalendar.isBanglaYearEn(dateBnYrOrCfg) ? dateBnYrOrCfg : Date.now());
419
- if (isNaN(date.getTime())) date = /* @__PURE__ */ new Date();
419
+ if (Number.isNaN(date.getTime())) date = /* @__PURE__ */ new Date();
420
420
  const { year, month, monthDate } = this.#processDate(date);
421
421
  let bnYear = BanglaCalendar.isBanglaYear(dateBnYrOrCfg) ? banglaToDigit(dateBnYrOrCfg) : isNumber(dateBnYrOrCfg) && BanglaCalendar.isBanglaYearEn(dateBnYrOrCfg) ? dateBnYrOrCfg : year;
422
422
  let bnMonth = BanglaCalendar.isBanglaMonth(bnMonthOrCfg) ? banglaToDigit(bnMonthOrCfg) : BanglaCalendar.isBanglaMonthEn(bnMonthOrCfg) ? bnMonthOrCfg : month;
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/object-D70hzkoY.d.mts
17
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/object-DyVg8BFt.d.mts
18
18
  declare const YEAR_FORMATS: readonly ["YYYY", "YY", "yyyy", "yy"];
19
19
  declare const MONTH_FORMATS: readonly ["M", "MM", "mmm", "mmmm"];
20
20
  declare const DATE_FORMATS: readonly ["DD", "D", "Do"];
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/object-D70hzkoY.d.mts
17
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/object-DyVg8BFt.d.mts
18
18
  declare const YEAR_FORMATS: readonly ["YYYY", "YY", "yyyy", "yy"];
19
19
  declare const MONTH_FORMATS: readonly ["M", "MM", "mmm", "mmmm"];
20
20
  declare const DATE_FORMATS: readonly ["DD", "D", "Do"];
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { c as Repeat, i as DateFormatToken, n as BanglaDigit, o as LooseLiteral, s as NumberRange, t as $BnOnes } from "./object-D70hzkoY-JjxsmDJd.cjs";
17
+ import { c as Repeat, i as DateFormatToken, n as BanglaDigit, o as LooseLiteral, s as NumberRange, t as $BnOnes } from "./object-DyVg8BFt-DFzPgPEP.cjs";
18
18
 
19
19
  //#region src/constants.d.ts
20
20
  /** Bangla month days table for different variants */
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { c as Repeat, i as DateFormatToken, n as BanglaDigit, o as LooseLiteral, s as NumberRange, t as $BnOnes } from "./object-D70hzkoY-JjxsmDJd.mjs";
17
+ import { c as Repeat, i as DateFormatToken, n as BanglaDigit, o as LooseLiteral, s as NumberRange, t as $BnOnes } from "./object-DyVg8BFt-DFzPgPEP.mjs";
18
18
 
19
19
  //#region src/constants.d.ts
20
20
  /** Bangla month days table for different variants */
package/dist/types.d.cts CHANGED
@@ -14,5 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as MSToken, D as TimeToken, E as SecondToken, O as YearToken, S as HourToken, T as MonthToken, _ as BnCalendarConfig, a as $BnEn, b as DateWithSeasonToken, c as BanglaDate, d as BanglaDateOptions, f as BanglaDayName, g as BanglaYear, h as BanglaSeasonName, i as $BnDatePadded, l as BanglaDateFormat, m as BanglaMonthName, n as $BanglaMonthDate, o as $BnMonthPadded, p as BanglaMonth, r as $BanglaYear, s as $BnYearPadded, t as $BanglaMonth, u as BanglaDateObject, v as BnCalendarVariant, w as MinuteToken, x as DayToken, y as DateToken } from "./types-BKGg1Ls7.cjs";
17
+ import { C as MSToken, D as TimeToken, E as SecondToken, O as YearToken, S as HourToken, T as MonthToken, _ as BnCalendarConfig, a as $BnEn, b as DateWithSeasonToken, c as BanglaDate, d as BanglaDateOptions, f as BanglaDayName, g as BanglaYear, h as BanglaSeasonName, i as $BnDatePadded, l as BanglaDateFormat, m as BanglaMonthName, n as $BanglaMonthDate, o as $BnMonthPadded, p as BanglaMonth, r as $BanglaYear, s as $BnYearPadded, t as $BanglaMonth, u as BanglaDateObject, v as BnCalendarVariant, w as MinuteToken, x as DayToken, y as DateToken } from "./types-BhqpTl07.cjs";
18
18
  export { $BanglaMonth, $BanglaMonthDate, $BanglaYear, $BnDatePadded, $BnEn, $BnMonthPadded, $BnYearPadded, BanglaDate, BanglaDateFormat, BanglaDateObject, BanglaDateOptions, BanglaDayName, BanglaMonth, BanglaMonthName, BanglaSeasonName, BanglaYear, BnCalendarConfig, BnCalendarVariant, DateToken, DateWithSeasonToken, DayToken, HourToken, MSToken, MinuteToken, MonthToken, SecondToken, TimeToken, YearToken };
package/dist/types.d.mts CHANGED
@@ -14,5 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as MSToken, D as TimeToken, E as SecondToken, O as YearToken, S as HourToken, T as MonthToken, _ as BnCalendarConfig, a as $BnEn, b as DateWithSeasonToken, c as BanglaDate, d as BanglaDateOptions, f as BanglaDayName, g as BanglaYear, h as BanglaSeasonName, i as $BnDatePadded, l as BanglaDateFormat, m as BanglaMonthName, n as $BanglaMonthDate, o as $BnMonthPadded, p as BanglaMonth, r as $BanglaYear, s as $BnYearPadded, t as $BanglaMonth, u as BanglaDateObject, v as BnCalendarVariant, w as MinuteToken, x as DayToken, y as DateToken } from "./types-CdJOp5Bk.mjs";
17
+ import { C as MSToken, D as TimeToken, E as SecondToken, O as YearToken, S as HourToken, T as MonthToken, _ as BnCalendarConfig, a as $BnEn, b as DateWithSeasonToken, c as BanglaDate, d as BanglaDateOptions, f as BanglaDayName, g as BanglaYear, h as BanglaSeasonName, i as $BnDatePadded, l as BanglaDateFormat, m as BanglaMonthName, n as $BanglaMonthDate, o as $BnMonthPadded, p as BanglaMonth, r as $BanglaYear, s as $BnYearPadded, t as $BanglaMonth, u as BanglaDateObject, v as BnCalendarVariant, w as MinuteToken, x as DayToken, y as DateToken } from "./types-CuBrWmN0.mjs";
18
18
  export { $BanglaMonth, $BanglaMonthDate, $BanglaYear, $BnDatePadded, $BnEn, $BnMonthPadded, $BnYearPadded, BanglaDate, BanglaDateFormat, BanglaDateObject, BanglaDateOptions, BanglaDayName, BanglaMonth, BanglaMonthName, BanglaSeasonName, BanglaYear, BnCalendarConfig, BnCalendarVariant, DateToken, DateWithSeasonToken, DayToken, HourToken, MSToken, MinuteToken, MonthToken, SecondToken, TimeToken, YearToken };
package/dist/utils.cjs CHANGED
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
18
- const require_dist = require('./dist-BasKGWW6.cjs');
18
+ const require_dist = require('./dist-2u-Hm2TM.cjs');
19
19
 
20
20
  exports.banglaToDigit = require_dist.banglaToDigit;
21
21
  exports.digitToBangla = require_dist.digitToBangla;
package/dist/utils.d.cts CHANGED
@@ -14,9 +14,9 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { r as BnDigitResult } from "./object-D70hzkoY-JjxsmDJd.cjs";
17
+ import { r as BnDigitResult } from "./object-DyVg8BFt-DFzPgPEP.cjs";
18
18
 
19
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/string-DXiOVFK6.d.mts
19
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/string-edtZyJHf.d.mts
20
20
  //#region src/types/string.d.ts
21
21
  declare global {
22
22
  interface String {
@@ -46,7 +46,7 @@ declare global {
46
46
  }
47
47
  /** - Options for generating anagrams. */
48
48
  //#endregion
49
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/index.d.mts
49
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/index.d.mts
50
50
  /**
51
51
  * * Converts Bangla (Arabic system) digits to Latin (Arabic system) digits.
52
52
  *
@@ -91,12 +91,13 @@ declare function banglaToDigit<Force extends boolean = true>(bnDigit: string, fo
91
91
  * digitToBangla('12ab'); // "১২ab"
92
92
  */
93
93
  declare function digitToBangla(digit: number | string, preserveNonDigit?: boolean): string; //#endregion
94
- //#region src/number/prime.d.ts
94
+ //#region src/number/utilities.d.ts
95
95
  /**
96
- * * Checks if a number is prime.
97
- *
98
- * @param number The number to check.
99
- * @returns Boolean: `true` if the number is prime, otherwise `false`.
96
+ * * Rounds a number to the nearest specified interval.
97
+ * @param value - The number to round.
98
+ * @param interval - The interval to round to. Defaults to `5`.
99
+ * @returns The number rounded to the nearest interval.
100
+ * @example roundToNearest(27, 5) → 25
100
101
  */
101
102
  //#endregion
102
103
  export { banglaToDigit, digitToBangla };
package/dist/utils.d.mts CHANGED
@@ -14,9 +14,9 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { r as BnDigitResult } from "./object-D70hzkoY-JjxsmDJd.mjs";
17
+ import { r as BnDigitResult } from "./object-DyVg8BFt-DFzPgPEP.mjs";
18
18
 
19
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/string-DXiOVFK6.d.mts
19
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/string-edtZyJHf.d.mts
20
20
  //#region src/types/string.d.ts
21
21
  declare global {
22
22
  interface String {
@@ -46,7 +46,7 @@ declare global {
46
46
  }
47
47
  /** - Options for generating anagrams. */
48
48
  //#endregion
49
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/index.d.mts
49
+ //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/index.d.mts
50
50
  /**
51
51
  * * Converts Bangla (Arabic system) digits to Latin (Arabic system) digits.
52
52
  *
@@ -91,12 +91,13 @@ declare function banglaToDigit<Force extends boolean = true>(bnDigit: string, fo
91
91
  * digitToBangla('12ab'); // "১২ab"
92
92
  */
93
93
  declare function digitToBangla(digit: number | string, preserveNonDigit?: boolean): string; //#endregion
94
- //#region src/number/prime.d.ts
94
+ //#region src/number/utilities.d.ts
95
95
  /**
96
- * * Checks if a number is prime.
97
- *
98
- * @param number The number to check.
99
- * @returns Boolean: `true` if the number is prime, otherwise `false`.
96
+ * * Rounds a number to the nearest specified interval.
97
+ * @param value - The number to round.
98
+ * @param interval - The interval to round to. Defaults to `5`.
99
+ * @returns The number rounded to the nearest interval.
100
+ * @example roundToNearest(27, 5) → 25
100
101
  */
101
102
  //#endregion
102
103
  export { banglaToDigit, digitToBangla };
package/dist/utils.mjs CHANGED
@@ -14,6 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { n as digitToBangla, t as banglaToDigit } from "./dist-BSh0fQzq.mjs";
17
+ import { n as digitToBangla, t as banglaToDigit } from "./dist-CL82Iohb.mjs";
18
18
 
19
19
  export { banglaToDigit, digitToBangla };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bn-calendar",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Comprehensive Bengali calendar system library built for any JavaScript and TypeScript environment.",
5
5
  "main": "./dist/index.cjs",
6
6
  "type": "module",
@@ -76,19 +76,19 @@
76
76
  },
77
77
  "license": "Apache-2.0",
78
78
  "devDependencies": {
79
- "@biomejs/biome": "^2.4.15",
80
- "@types/node": "^25.9.1",
79
+ "@biomejs/biome": "^2.5.0",
80
+ "@types/node": "^26.0.0",
81
81
  "husky": "^9.1.7",
82
- "lint-staged": "^17.0.5",
82
+ "lint-staged": "^17.0.7",
83
83
  "nhb-scripts": "^1.9.2",
84
- "toolbox-x": "1.0.1-rc.6",
85
- "tsdown": "^0.22.0",
84
+ "toolbox-x": "2.4.2",
85
+ "tsdown": "^0.22.3",
86
86
  "typescript": "^6.0.3"
87
87
  },
88
88
  "lint-staged": {
89
89
  "*.+((c|m)?js(x)?|(c|m)?ts(x)?)": [
90
- "biome format --write --diagnostic-level=error",
91
- "biome lint --diagnostic-level=error"
90
+ "biome format --write --diagnostic-level=warn",
91
+ "biome lint --diagnostic-level=warn"
92
92
  ]
93
93
  },
94
94
  "module": "./dist/index.mjs",
@@ -109,7 +109,7 @@
109
109
  "./package.json": "./package.json"
110
110
  },
111
111
  "inlinedDependencies": {
112
- "toolbox-x": "1.0.1-rc.6"
112
+ "toolbox-x": "2.4.2"
113
113
  },
114
114
  "scripts": {
115
115
  "build": "tsdown",
@@ -118,8 +118,8 @@
118
118
  "commit": "nhb-commit",
119
119
  "count": "nhb-count",
120
120
  "delete": "nhb-delete",
121
- "lint": "biome lint --diagnostic-level=error",
122
- "fix": "biome check --write --diagnostic-level=error",
123
- "format": "biome format --write --diagnostic-level=error"
121
+ "lint": "biome lint --diagnostic-level=warn",
122
+ "fix": "biome check --write --diagnostic-level=warn",
123
+ "format": "biome format --write --diagnostic-level=warn"
124
124
  }
125
125
  }