{"_id":"@aaronburt/typechecker","name":"@aaronburt/typechecker","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aaronburt/typechecker","version":"1.0.0","description":"A typechecker built in ts and compliled to js","main":"typeChecker.min.js","scripts":{"compress":"uglifyjs typeChecker.js -o typeChecker.min.js -m"},"type":"module","keywords":["Type checking","JavaScript","TypeScript","TypeScript type checking","TypeScript type guards","TypeScript type assertions","TypeScript type inference","TypeScript type system","TypeScript type safety","TypeScript type erasure","TypeScript type compatibility","TypeScript type narrowing","TypeScript type widening","TypeScript type predicates","TypeScript type guards with type predicates","TypeScript typeof type guards","TypeScript instanceof type guards","TypeScript type alias","TypeScript type intersection","TypeScript type union","TypeScript type intersection with type alias","TypeScript type union with type alias","TypeScript type literal","TypeScript type assertions with type alias","TypeScript type inference with type alias","TypeScript type widening with type alias","TypeScript type narrowing with type alias","TypeScript type compatibility with type alias","TypeScript type erasure with type alias","TypeScript type system with type alias"],"author":{"name":"aaronburt"},"license":"MIT","gitHead":"4d47b5ae3f575d83a10922e45032d083637dff78","_id":"@aaronburt/typechecker@1.0.0","_nodeVersion":"18.12.1","_npmVersion":"9.1.2","dist":{"integrity":"sha512-NQ44MlZYJCpVY7O4F1UpO7BUOqVNEfZ8zm55ciGNILpEczXfkD4iul/2VOKGkFdRLwj2NfUZbOZaKT7Prn3uyA==","shasum":"2d8d2b6d24c99bec1812ca352097dd0183ed0767","tarball":"https://registry.npmjs.org/@aaronburt/typechecker/-/typechecker-1.0.0.tgz","fileCount":7,"unpackedSize":7036,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEpjahHCS6uNDf/de/fytcgm9qiUBHB2viAXUoSpvL0EAiEAoj03yAkc4LRm1aemELYjS8KKAJ+dOOqyXvpuUbg7bEA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkrktACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/8RAAoxUvmFFqSZyRY0c6yVFn+jfiNUBnGO0a01OIiLwTF0U1NUTX\r\nFFsmDiDkM4OHLI9YmfLCWQRrKuSZq3DRWUxo4x8+O0oeMNMhh0n+0gOtOwYN\r\n7ckS0A7Ij/JmbkzgMkcCMfbcV+it6R2ddcIS8hNeO3lTpoIyQvMCvVGYG5jy\r\nMjflFKaAITVz+NY0HTLXRzIa/JKf84FITakVxFChZySW3cmPFcJUcGaipdoW\r\nwknXhYtMYtngtyNxbG0LraYXkorhZo3/IU7KmaaeqVRW+pIyhW3cG4MWAit8\r\n9HRBXes+enPbcAIUSWMvf0z6QVMXMHLY319CZg6vqDS7Gsoexx28XiSnqppj\r\nD7552aHDZr5WFlHYA5W1Kt4zMRHlbTiCfMN0F6o5/bAGgn3CWgHfRHvS8SeU\r\ns/8DKK4c3ifpLMlNDHpoNGB0Ego9G3tA0+62eqPNAfi0b0aLwD399IcqkQWZ\r\nc9AqBzkegXs/ss/0yv20Cozo4R5XLcf41tNB4S0CwfxaCAMw630i1UNB4Seb\r\ndds4XeY3uZq4Y3qdSTZd2kL2kterF3Jde6UWcd/mgF+M9Xzoz9qnsiCbKZZw\r\n9H0iU162ltKu1u8Ysz6Vy/k/o8U7YqA6UsaKpXnyvaMZzs/gTmYx6dVRibl3\r\nesWLoHsY+LAB+sMT0zbqUJCE1uAcWgYTAXY=\r\n=3GzY\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aaronburt","email":"npm@aaronburt.co.uk"},"directories":{},"maintainers":[{"name":"aaronburt","email":"npm@aaronburt.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typechecker_1.0.0_1670560045679_0.33084579350704924"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-09T04:27:25.635Z","1.0.0":"2022-12-09T04:27:25.871Z","modified":"2022-12-09T04:27:26.015Z"},"maintainers":[{"name":"aaronburt","email":"npm@aaronburt.co.uk"}],"description":"A typechecker built in ts and compliled to js","keywords":["Type checking","JavaScript","TypeScript","TypeScript type checking","TypeScript type guards","TypeScript type assertions","TypeScript type inference","TypeScript type system","TypeScript type safety","TypeScript type erasure","TypeScript type compatibility","TypeScript type narrowing","TypeScript type widening","TypeScript type predicates","TypeScript type guards with type predicates","TypeScript typeof type guards","TypeScript instanceof type guards","TypeScript type alias","TypeScript type intersection","TypeScript type union","TypeScript type intersection with type alias","TypeScript type union with type alias","TypeScript type literal","TypeScript type assertions with type alias","TypeScript type inference with type alias","TypeScript type widening with type alias","TypeScript type narrowing with type alias","TypeScript type compatibility with type alias","TypeScript type erasure with type alias","TypeScript type system with type alias"],"author":{"name":"aaronburt"},"license":"MIT","readme":"# TypeChecker\nThe TypeChecker class provides a set of methods for performing type checking in JavaScript.\n\n### Usage\nTo use the TypeChecker class, you will first need to import it into your project:\n\n```\nimport TypeChecker from '@aaronburt/typechecker';\n```\n\nOnce the class is imported, you can create an instance of it and use its methods to perform type checks on JavaScript values:\n\n```\nconst typeChecker = new TypeChecker();\n\n// Check if a value is a string\nconsole.log(typeChecker.isString('hello world')); // Output: true\n\n// Check if a value is a number\nconsole.log(typeChecker.isNumber(123)); // Output: true\n\n// Check if a value is a function\nconsole.log(typeChecker.isFunction(() => {})); // Output: true\n\n// Check if a value is an array\nconsole.log(typeChecker.isArray([1, 2, 3])); // Output: true\n\n// Check if a value is null\nconsole.log(typeChecker.isNull(null)); // Output: true\n\n// Check if a value is undefined\nconsole.log(typeChecker.isUndefined(undefined)); // Output: true\n\n// Check if a value is an error\nconsole.log(typeChecker.isError(new Error())); // Output: true\n\n// Check if a value is a promise\nconsole.log(typeChecker.isPromise(Promise.resolve())); // Output: true\n\n// Check if a value is a map\nconsole.log(typeChecker.isMap(new Map())); // Output: true\n\n// Check if a value is an object\nconsole.log(typeChecker.isObject({})); // Output: true\n\n// Check if a value is an async function\nconsole.log(typeChecker.isAsyncFunction(async () => {})); // Output: true\n```\n### Methods\nThe TypeChecker class provides the following methods for performing type checks:\n\n- isType(value: any, type: any) - Checks if a given value is of the specified type.\n- isString(input: string) - Checks if a given value is a string.\n- isNumber(input: number) - Checks if a given value is a number.\n- isFunction(input: Function) - Checks if a given value is a function.\n- isArray(input: any[]) - Checks if a given value is an array.\n- isNull(input: null) - Checks if a given value is null.\n- isUndefined(input: undefined) - Checks if a given value is undefined.\n- isError(input: any) - Checks if a given value is an error.\n- isPromise(input: Promise<any>) - Checks if a given value is a promise.\n- isMap(input: Map<any, any>) - Checks if a given value is a map.\n- isObject(input: Object) - Checks if a given value is an object.\n- isAsyncFunction(input: any) - Checks if a given value is an async function.","readmeFilename":"readme.md"}