{"id":19590522,"url":"https://github.com/mudssrali/js-helpers","last_synced_at":"2026-04-05T23:04:52.160Z","repository":{"id":116503406,"uuid":"216510494","full_name":"mudssrali/js-helpers","owner":"mudssrali","description":"Contains JavaScript cool ready to use helper functions","archived":false,"fork":false,"pushed_at":"2024-04-13T11:41:16.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-04T10:58:26.762Z","etag":null,"topics":["es6","es6-javascript","esnext","helper-functions","javascript","reactjs","typescript","utilities"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mudssrali.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-21T08:00:33.000Z","updated_at":"2024-08-02T03:58:37.000Z","dependencies_parsed_at":"2024-04-13T12:47:51.967Z","dependency_job_id":null,"html_url":"https://github.com/mudssrali/js-helpers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mudssrali/js-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mudssrali%2Fjs-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mudssrali%2Fjs-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mudssrali%2Fjs-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mudssrali%2Fjs-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mudssrali","download_url":"https://codeload.github.com/mudssrali/js-helpers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mudssrali%2Fjs-helpers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264396622,"owners_count":23601541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["es6","es6-javascript","esnext","helper-functions","javascript","reactjs","typescript","utilities"],"created_at":"2024-11-11T08:25:09.995Z","updated_at":"2025-12-30T22:13:56.007Z","avatar_url":"https://github.com/mudssrali.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JavaScript Helpers\n\nSome hand-crafted ES6 based JavaScript (type guarded - [TypeScript](https://github.com/mudssrali/typescript-cheatsheet) based) utility functions:\n\n- **Convert blob to base64 string**\n  ```ts\n   canvasToBlob( canvas: HTMLCanvasElement, options: Options = {})\n  ```\n  [View Code](./src/canvasToBlob.ts)\n\n- **Convert blob to base64 string**\n  ```ts\n   blobToBase64(blob: Blob)\n  ```\n  [View Code](./src/blobToBase64.ts)\n\n- **String utils**\n  ```ts\n    isValidLength(str: string, minLength: number)\n    isValidEmail(email: string)\n    removeFileExtension(filename: string)\n  ```\n\n  [View Code](./src/string.ts)\n\n- **Split Array into Chunks**\n\n   ```js\n    chunkify(kvArray = [], chunkSize = 10, reverse = false): Array\u003c[]\u003e\n   ```\n\n  [View Code](./src/chunkify.js)\n\n- **Split Array into Chunks** - V2\n\n   ```js\n    chunkify(kvArray = [], chunkSize = 10): Array\u003c[]\u003e\n   ```\n\n  [View Code](./src/chunkify2.js)\n  \n- **Split Array into Chunks** - V3\n\n   ```js\n    chunkify(kvArray: T[], chunkSize: number): Array\u003cT[]\u003e\n   ```\n\n  [View Code](./src/chunkify3.ts)\n\n- **Check number**\n\n  ```js\n    isDecimalNumber(number: any): boolean\n    isFloat(value: any): boolean\n  ```\n\n  [View Code](./src/typeTeller.js)\n\n- **Convert text to Titled-Case**\n\n  ```js\n    toTitleCase(text: string,  delimiter = ' '): string\n  ```\n\n  \u003e e.g. toTitleCase(\"mUdAssaAr lOves OpEn SouRCe\") ===========\u003e Mudassar Loves Open Source\n  \n  [View Code](./src/toTitleCase.js)\n\n- **Prettify Number**\n  \n  **Description**: Prettify a number for use in the application. Use toLocaleString, but also force a standard number of decimal places if it's a float.\n\n  ```js\n    prettifyNumber(number): string\n  ```\n\n  [View Code](./src/prettifyNumber.js)\n\n- **Random Color Code Generator**\n\n  ```js\n    randomColorGenerator(): string\n  ```\n\n  [View Code](./src/randomColorGenerator.js)\n\n- **Bump Array Sort**\n  **Description**: Return a new sorted array, except with one value bumped to the front. This function does not sort an array in place; a new array is returned.\n\n  ```js\n    bumpSort(kvArray: Array, bumpValue: any): Array\n  ```\n\n  [View Code](./src/bumpSort.js)\n\n- **Sort Year Months**\n\n  ```js\n    sortYearMonths(kvSet: Set\u003cstring\u003e): Array\n    sortYearMonths(kvArray: Array\u003cstring\u003e): Array\n  ```\n\n  [View Code](./src/sortYearMonths.js)\n\n- **Array Utils**\n\n  ```js\n    isEqual(array1: Array\u003cany\u003e, array2: Array\u003cany\u003e): boolean\n    takeRight(array: Array\u003cany\u003e, n: number): Array\u003cany\u003e\n  ```\n\n  [View Code](./src/arrayUtils.ts)\n\n- **Format File Size**\n\n  ```js\n    formatFileSize(bytes: number, suffixIndex = 0): string\n  ```\n\n  [View Code](./src/formatFileSize.js)\n\n- **Kebab Case to Title Case**\n\n  ```js\n    kebabToTitleCase(str: string): string\n  ```\n\n  [View Code](./src/kebabToTitleCase.js)\n\n## Contributions\n\nContributions of any kind are welcome.\n\n[MIT-LICENSE](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmudssrali%2Fjs-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmudssrali%2Fjs-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmudssrali%2Fjs-helpers/lists"}