{"id":25195977,"url":"https://github.com/simplisticated/easy-types","last_synced_at":"2025-09-15T02:34:15.719Z","repository":{"id":58393449,"uuid":"531613163","full_name":"simplisticated/easy-types","owner":"simplisticated","description":"Better way of working with types in TypeScript","archived":false,"fork":false,"pushed_at":"2023-02-22T19:05:39.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T01:39:13.770Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/simplisticated.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}},"created_at":"2022-09-01T17:07:16.000Z","updated_at":"2022-09-01T17:37:32.000Z","dependencies_parsed_at":"2022-09-02T14:20:37.842Z","dependency_job_id":null,"html_url":"https://github.com/simplisticated/easy-types","commit_stats":null,"previous_names":["russo-programmisto/easy-types"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2Feasy-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2Feasy-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2Feasy-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2Feasy-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplisticated","download_url":"https://codeload.github.com/simplisticated/easy-types/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208022,"owners_count":20901568,"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":[],"created_at":"2025-02-10T01:39:16.534Z","updated_at":"2025-04-04T15:44:18.632Z","avatar_url":"https://github.com/simplisticated.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://nodejs.org\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Created for-Node.js-teal.svg?style=flat\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.typescriptlang.org\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Written in-TypeScript-purple.svg?style=flat\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://tldrlegal.com/license/mit-license\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=flat\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## At a Glance\n\n**easy-types** is a better way of working with types in TypeScript. Much better than the normal approach suggested by JavaScript. If you are tired of using `typeof`, `Array.isArray`, `=== null` and other annoying things, then this library is a solution.\n\n## How to Get Started\n\nType in Terminal:\n\n```\nnpm install --save @russo-programmisto/easy-types\n```\n\nor, if you prefer **yarn** over **npm**, type:\n\n```\nyarn add @russo-programmisto/easy-types\n```\n\nThen add import instruction to your code:\n\n```typescript\nimport { getType, Type } from '@russo-programmisto/easy-types'\n```\n\n## Requirements\n\nBasic knowledge of TypeScript and NPM.\n\n## Usage\n\n```typescript\nconst obj = {};\nconst type = getType(obj);\ntype === Type.object // true\ntype === Type.null // false\n\n// get type easily\ngetType(\"\") === Type.string // true\ngetType(undefined) === Type.undefined // true\n\n// or even easier\nisType(\"\", Type.string) // true\n\n// check whether it's array or object\nisType(obj, Type.array, Type.object)\n\n// check missing values\nisNullOrUndefined(obj)\n\n// check empty values\nisEmptyString(\"\") // true\nisEmptyArray([]) // true\nisEmptyObject({}) // true\n\n// or you can simply use `isEmpty` method that works for strings, arrays, and non-array objects:\nisEmpty(\"\") // true\nisEmpty([]) // true\nisEmpty({}) // true\n\n// combine checks\nisEmpty(obj.field) || isNullOrUndefined(obj.field)\n```\n\n## License\n\n**types** is available under the MIT license. See the [LICENSE](./LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplisticated%2Feasy-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplisticated%2Feasy-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplisticated%2Feasy-types/lists"}