Skip to content

Instantly share code, notes, and snippets.

View montasim's full-sized avatar
💭
𝗟𝗢𝗢𝗞𝗜𝗡𝗚 𝗙𝗢𝗥 𝗡𝗘𝗪 𝗢𝗣𝗣𝗢𝗥𝗧𝗨𝗡𝗜𝗧𝗜𝗘𝗦.

M♢NTΛSIM montasim

💭
𝗟𝗢𝗢𝗞𝗜𝗡𝗚 𝗙𝗢𝗥 𝗡𝗘𝗪 𝗢𝗣𝗣𝗢𝗥𝗧𝗨𝗡𝗜𝗧𝗜𝗘𝗦.
View GitHub Profile
@montasim
montasim / zodLanguageValidation.js
Created January 29, 2025 14:20
Language-wise Regular Expressions.
import { z } from "zod"; // Ensure Zod is imported
/**
* Regular expressions for various languages.
* Each language key maps to its corresponding Unicode regex pattern.
*/
const languageRegexPatterns = {
english: /^[A-Za-z\s]*$/, // English
bangla: /^[\u0980-\u09FF\s]*$/, // Bangla (Bengali)
hindi: /^[\u0900-\u097F\s]*$/, // Hindi (Devanagari)
@montasim
montasim / README.md
Created January 29, 2025 08:11
README.md template suitable for NPM.

mime-types-lite

NPM Version NPM Downloads NPM Package
@montasim
montasim / eslint.config.mjs
Created January 28, 2025 12:03
ESLint configuration for a JavaScript/TypeScript project.
/**
* @fileoverview ESLint configuration for a JavaScript/TypeScript project.
* This configuration enforces best practices, coding conventions, and ensures code consistency
* for general JavaScript and React-based projects.
*
* The configuration includes:
* - File matching patterns for JavaScript and TypeScript files
* - Language options for specifying globals and parsers
* - Plugins such as TypeScript ESLint for enhanced linting rules
* - Recommended rulesets for both JavaScript and TypeScript
/**
* @fileoverview Defines a list of known user agent strings.
* This list includes user agents for API testing tools, bots, crawlers, HTTP libraries, automation tools, and scrapers.
* It can be used to identify and filter traffic from these sources.
*
* @module vendor/userAgents
* @version 1.0.0
* @license CC BY-NC-ND 4.0
*
* @contact Mohammad Montasim-Al-Mamun Shuvo
@montasim
montasim / httpMethods.constants.js
Last active January 28, 2025 08:28
Defines the various HTTP methods used in the application.
/**
* @fileoverview Defines the various HTTP methods used in the application.
* This module exports an object that contains the different HTTP methods
* the application can handle. These methods are used to configure
* the application behavior based on the current HTTP method.
*
* @module constants/httpMethods
* @version 1.0.0
* @license CC BY-NC-ND 4.0
*
@montasim
montasim / contentTypes.constants.js
Last active January 28, 2025 08:28
Defines the various content types used in the application.
/**
* @fileoverview Defines the various content types used in the application.
* This module exports an object that contains the different content types
* the application can handle. These content types are used to configure
* the application behavior based on the current content type.
*
* @module constants/contentTypes
* @version 1.0.0
* @license CC BY-NC-ND 4.0
*
@montasim
montasim / enviornments.constants.js
Last active January 28, 2025 08:28
Defines the various environments used in the application.
/**
* @fileoverview Defines the various environments used in the application.
* This module exports an object that contains the different environments
* the application can run in. These environments are used to configure
* the application behavior based on the current environment.
*
* @module constants/environments
* @version 1.0.0
* @license CC BY-NC-ND 4.0
*
@montasim
montasim / .env.example
Created January 27, 2025 10:35
This file serves as a template for configuring environment variables essential for the development environment.
####################################################
# .env.production Configuration File
####################################################
# This file serves as a template for configuring environment variables essential for the development environment.
# Adjust these settings to align with your specific development needs and infrastructure requirements.
####################################################
# APPLICATION ENVIRONMENT
@montasim
montasim / eslint.config.mjs
Created December 26, 2024 12:20
This configuration includes rules and settings for general JavaScript and React projects. It aims to enforce best practices, coding conventions, and ensure code consistency.
import globals from 'globals';
import pluginJs from '@eslint/js';
import pluginReact from 'eslint-plugin-react';
/**
* ESLint configuration for a JavaScript/TypeScript project.
*
* This configuration includes rules and settings for general JavaScript and React projects.
* It aims to enforce best practices, coding conventions, and ensure code consistency.
*
@montasim
montasim / .nvmrc
Last active January 28, 2025 12:06
####################################################
# .nvmrc Configuration File
####################################################
#
# Version: 1.0.0
# License: CC BY-NC-ND 4.0
#
# Author: Mohammad Montasim-Al-Mamun Shuvo
# Created: 2025-01-28
# Contact Email: [email protected]