{"id":19589782,"url":"https://github.com/supercharge/classes","last_synced_at":"2025-04-27T12:33:07.549Z","repository":{"id":57163596,"uuid":"239981463","full_name":"supercharge/classes","owner":"supercharge","description":"Class utilities for Node.js and JavaScript","archived":false,"fork":false,"pushed_at":"2022-10-08T14:15:37.000Z","size":56,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-17T01:13:59.879Z","etag":null,"topics":["class","nodejs","supercharge","utilities"],"latest_commit_sha":null,"homepage":"","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/supercharge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-12T10:09:02.000Z","updated_at":"2021-12-01T09:22:44.000Z","dependencies_parsed_at":"2022-09-01T03:12:02.384Z","dependency_job_id":null,"html_url":"https://github.com/supercharge/classes","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercharge%2Fclasses","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercharge%2Fclasses/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercharge%2Fclasses/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercharge%2Fclasses/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supercharge","download_url":"https://codeload.github.com/supercharge/classes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251138934,"owners_count":21541976,"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":["class","nodejs","supercharge","utilities"],"created_at":"2024-11-11T08:20:58.237Z","updated_at":"2025-04-27T12:33:07.207Z","avatar_url":"https://github.com/supercharge.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\r\n  \u003ca href=\"https://superchargejs.com\"\u003e\r\n    \u003cimg width=\"471\" style=\"max-width:100%;\" src=\"https://superchargejs.com/images/supercharge-text.svg\" /\u003e\r\n  \u003c/a\u003e\r\n  \u003cbr/\u003e\r\n  \u003cbr/\u003e\r\n  \u003cp\u003e\r\n    \u003ch3\u003eClasses\u003c/h3\u003e\r\n  \u003c/p\u003e\r\n  \u003cp\u003e\r\n    Class utilities for Node.js and JavaScript\r\n  \u003c/p\u003e\r\n  \u003cbr/\u003e\r\n  \u003cp\u003e\r\n    \u003ca href=\"#installation\"\u003e\u003cstrong\u003eInstallation\u003c/strong\u003e\u003c/a\u003e ·\r\n    \u003ca href=\"#usage\"\u003e\u003cstrong\u003eUsage\u003c/strong\u003e\u003c/a\u003e ·\r\n    \u003ca href=\"#api\"\u003e\u003cstrong\u003eAPI\u003c/strong\u003e\u003c/a\u003e\r\n  \u003c/p\u003e\r\n  \u003cbr/\u003e\r\n  \u003cbr/\u003e\r\n  \u003cp\u003e\r\n    \u003ca href=\"https://www.npmjs.com/package/@supercharge/classes\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@supercharge/classes.svg\" alt=\"Latest Version\"\u003e\u003c/a\u003e\r\n    \u003ca href=\"https://www.npmjs.com/package/@supercharge/classes\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/@supercharge/classes.svg\" alt=\"Monthly downloads\"\u003e\u003c/a\u003e\r\n  \u003c/p\u003e\r\n  \u003cp\u003e\r\n    \u003cem\u003eFollow \u003ca href=\"http://twitter.com/marcuspoehls\"\u003e@marcuspoehls\u003c/a\u003e and \u003ca href=\"http://twitter.com/superchargejs\"\u003e@superchargejs\u003c/a\u003e for updates!\u003c/em\u003e\r\n  \u003c/p\u003e\r\n\u003c/div\u003e\r\n\r\n---\r\n\r\n## Introduction\r\nThe `@supercharge/classes` package provides a handful methods around classes in Node.js and JavaScript. For example, determine whether a given input is a class using the `.isClass(input)` method.\r\n\r\n\r\n## Installation\r\n\r\n```\r\nnpm i @supercharge/classes\r\n```\r\n\r\n\r\n## Usage\r\nUsing `@supercharge/classes` is pretty straightforward. Install and import the package and use it right away:\r\n\r\n```js\r\nconst { isClass } = require('@supercharge/classes')\r\n\r\nisClass(class Rabbit {})\r\n// true\r\n\r\nisClass(function classLikeRabbitFunc () {})\r\n// false\r\n```\r\n\r\n\r\n## API\r\n\r\n#### `isClass(input)`\r\nDetermine whether the given `input` is a class.\r\n\r\n```js\r\nconst { isClass } = require('@supercharge/classes')\r\n\r\nisClass(class YourClass {})\r\n// true\r\n```\r\n\r\n\r\n#### `isFunction(input)`\r\nDetermine whether the given `input` is a function.\r\n\r\n```js\r\nconst { isFunction } = require('@supercharge/classes')\r\n\r\nisFunction(function sum () {})\r\n// true\r\n```\r\n\r\n\r\n## Contributing\r\nDo you miss a class-related function? We very much appreciate your contribution! Please send in a pull request 😊\r\n\r\n1.  Create a fork\r\n2.  Create your feature branch: `git checkout -b my-feature`\r\n3.  Commit your changes: `git commit -am 'Add some feature'`\r\n4.  Push to the branch: `git push origin my-new-feature`\r\n5.  Submit a pull request 🚀\r\n\r\n\r\n## License\r\nMIT © [Supercharge](https://superchargejs.com)\r\n\r\n---\r\n\r\n\u003e [superchargejs.com](https://superchargejs.com) \u0026nbsp;\u0026middot;\u0026nbsp;\r\n\u003e GitHub [@supercharge](https://github.com/supercharge) \u0026nbsp;\u0026middot;\u0026nbsp;\r\n\u003e Twitter [@superchargejs](https://twitter.com/superchargejs)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupercharge%2Fclasses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupercharge%2Fclasses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupercharge%2Fclasses/lists"}