{"id":20826915,"url":"https://github.com/crizmo/customjs","last_synced_at":"2026-04-19T23:33:36.872Z","repository":{"id":179868881,"uuid":"664023340","full_name":"crizmo/customjs","owner":"crizmo","description":"Customjs is a simple npm package that allows you to customize certain JavaScript functions.","archived":false,"fork":false,"pushed_at":"2023-07-14T15:22:48.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-27T09:25:09.801Z","etag":null,"topics":["custom","customize","js","npm"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@kurizu/customjs","language":"JavaScript","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/crizmo.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":"2023-07-08T17:55:34.000Z","updated_at":"2025-10-16T16:14:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"93c4e117-7e0a-4310-94f8-d5115c89d6d3","html_url":"https://github.com/crizmo/customjs","commit_stats":null,"previous_names":["crizmo/customjs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/crizmo/customjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crizmo%2Fcustomjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crizmo%2Fcustomjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crizmo%2Fcustomjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crizmo%2Fcustomjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crizmo","download_url":"https://codeload.github.com/crizmo/customjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crizmo%2Fcustomjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32026630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["custom","customize","js","npm"],"created_at":"2024-11-17T23:10:28.366Z","updated_at":"2026-04-19T23:33:36.860Z","avatar_url":"https://github.com/crizmo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CustomJS\n\nCustomJS is a simple npm package that allows you to customize JavaScript functions with additional features, such as logging with customizable colors.\n\n## Installation\n\nYou can install CustomJS using npm:\n\n```bash\nnpm install @kurizu/customjs\n```\n\n# Functions\n1 - SetLog\n\nThe SetLog function allows you to customize logging behavior by assigning a logging function to a specified variable name. It also supports customizing the log level and color.\n\nFirst, import the package and initialize it by calling the setlog function and passing a variable name and log level. This will assign the customized logging function to the specified variable:\n\n```javascript\nconst custom = require('@kurizu/customjs');\ncustom.setlog('log', 'info');\n```\n\nNow you can use the assigned variable to `log` messages to the console with the specified log level:\n\n```javascript\nlog('Hello World!');\n```\n\nYou can have multiple instances of `setlog` running at the same time by calling the `setlog` function with different variable names:\n\n```javascript\nconst custom = require('@kurizu/customjs');\ncustom.setlog('log', 'info');\ncustom.setlog('log2', 'warning');\n```\n\nYou can also use the assigned variables to log messages to the console:\n\n```javascript\nlog('Hello World!'); // Logs an info message in cyan color: Hello World!\nlog2('Hello World! 2'); // Logs a warning message in yellow color: Hello World 2!\n```\n\n2 - Calculate \nThe calculate function basically lets you do operations strings.\n    \n```javascript   \nconst custom = require('@kurizu/customjs');\ncustom.calculate([1, '2'], '-')\n```\n\nThe available operations are:\n- `+` for addition\n- `-` for subtraction\n- `*` for multiplication\n- `/` for division\n- `%` for modulus\n- `**` for exponentiation\n\nYou cause even use it with the `setlog` function to log the result of the calculation:\n\n```javascript\nconst custom = require('@kurizu/customjs');\ncustom.setlog('log', 'info');\nlog(custom.calculate([1, '2', 3], '*')); // Logs an info message in cyan color: 6\n```\n\nAnd can pass the amount of numbers you want as array:\n\n```javascript\nconst custom = require('@kurizu/customjs');\ncustom.setlog('log', 'info');\nlog(custom.calculate([1, '2', 3, \"4\", 5], '*')); // Logs an info message in cyan color: 120\n```\n\n## Available Log Levels and Colors\n\nCustomJS supports the following log levels and their corresponding colors:\n\n1. none: No color formatting applied\n2. info: Cyan color\n3. warning: Yellow color\n4. error: Red color\n\nYou can customize the log level when calling setlog by providing the desired log level as the second argument. If an invalid log level is provided, an error message will be displayed.\n\n# Features\n\nCustomJS aims to provide customizable JavaScript functions for various purposes. In the future, I plan to add more features and functionalities to this package. If you have any suggestions, feel free to open an issue on the GitHub repository.\n\n# License\n\nThis project is licensed under the MIT License. See the LICENSE file for more details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrizmo%2Fcustomjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrizmo%2Fcustomjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrizmo%2Fcustomjs/lists"}