TypeScript
Β
I mainly created this library so that I can use it in many web developing projects without duplicating codes
Β
- π₯ HTTP Method Containing Object Cursor Just Like Java Spring Boot
- β¨ HTTP Response Status Code Containing Object
- π HTML
langAttribute Value Containing Object - π HTTP Method Type Which Will Ensure Type Safety For Valid HTTP Methods
- π Information Regarding The Object Properties On Mouse Hover
Β
- It contains the available HTTP Method names as string
- Java has similar Enum called
HttpMethodinorg.springframework.httppackage - Get all the available HTTP Methods without looking at elsewhere
- Hover over the properties to get the information on the method
- You need not go search on google to find out which method does what
- For usage instruction, see
Usagesection
- It contains the available HTTP Response Status Codes as number
- Get all the available HTTP Response Status Codes without looking at elsewhere
- Hover over the properties to get the information on the status codes
- You need not go search on google to find out which staus code means what
- For usage instruction, see
Usagesection
- It contains the available values for languages of HTML
langattribute - Get all the available HTML
langattribute values without looking at elsewhere - You need not go search on google to find out the languages
- For usage instruction, see
Usagesection
- It has all the valid values of HTTP methods
- For usage instruction, see
Usagesection
Β
- Any JS, TS, Node Project
Β
Β
npm add @best-skn/web-utils #or yarn add @best-skn/web-utils #or pnpm add @best-skn/web-utils #or bun add @best-skn/web-utils
import { httpMethod } from "@best-skn/web-utils"; export const allowedMethods = [httpMethod.GET, httpMethod.POST, httpMethod.DELETE];
import { httpResponse } from "@best-skn/web-utils"; export const allowedCodes = [httpResponse._200, httpResponse._404, httpResponse._403];
import { htmlLanguage } from "@best-skn/web-utils"; const Home = () => ( <html lang={htmlLanguage.ITALIAN}> {!-- Rest of the codes --} </html> ); export default Home;
import type { HttpMethod } from "@best-skn/web-utils"; const someFunction = (arg: HttpMethod) => { // Some Logic Here }; // You'll get type safe valid HTTP Method suggestions here someFunction("GET");
Β
- π©βπ¨
Prodipta Das Logno& π§ββοΈAtoshi Sarker Prithula: The two most special ladies of my life. My best wishes will always be with you two. May you two always be happy. - π―
My Parents: The greatest treasures of my life ever.
Β
Copyright (C) 2024 SKN Shukhan
Licensed under the MIT License