Useful JavaScript Methods by Nijat Aliyev (@developer.nijat)
npm install "@developer.nijat/js-helpers"
or
yarn add "@developer.nijat/js-helpers"
import React from "react";
import { generateRandomColor } from "@developer.nijat/js-helpers";
export default function App() {
function test() {
const randomColor = generateRandomColor();
console.log(randomColor);
}
return <>Demo Content</>;
}
getFileSize
htmlDecode
htmlEncode
getRandomNumber
uniqueNumberFromString
normalizeGraphFilterForExpress
normalizeAzPhoneNumber
normalizeAz9DigitNumber
extractNumberFromTime
calculatePercentageOfNumber
generateRandomColor
normalizeSearchParams
sumAllBetweenTwoIntegers
capitalizeFirstLetter
convertFileToUint8Array
getUniqueListByKey
toFixedWithoutRounding
getFileMimeTypeByExt
removeObjectPropertiesWithValue
toSnakeCase
convertMillisToMinutesAndSeconds
calculateDurationWithStartDate
convertDateToMilliSeconds
convertTime12to24
convertSecondsToTime
getWeekOfMonth
getStartDateOfWeek
getEndDateOfWeek
validateEmail
validateNumber
isJsonString