{"_id":"ts-extended-types","_rev":"3-46e2d8217560e35db8d34c9e2af763f4","name":"ts-extended-types","dist-tags":{"latest":"1.1.0"},"versions":{"0.10.0":{"name":"ts-extended-types","version":"0.10.0","description":"Set of complementary basic types related to the ones provided by TypeScript to make your application even more type-safe","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{},"devDependencies":{"typescript":"^3.5.3"},"scripts":{"build":"rm -Rf dist/*; tsc","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/juanluispaz/ts-extended-types.git"},"keywords":["typescript","type","types","int","double","date","local date","time","local time","datetime","date time","local datetime","local date time"],"author":{"name":"Juan Luis Paz Rojas","url":"http://github.com/juanluispaz"},"license":"MIT","bugs":{"url":"https://github.com/juanluispaz/ts-extended-types/issues"},"homepage":"https://github.com/juanluispaz/ts-extended-types","gitHead":"c92537a5037001023426912a8ef3f173bd7b53fe","_id":"ts-extended-types@0.10.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-YxCzJ9WrsoOQYg2weLNGUItszR62zXVewS9g+qfHXmRGpWQ3fQdQlZa0Dk9ar8TXNMXb8CuH7d703YdmdUWs5w==","shasum":"1e66310aadee870ac726048ec7b8af649720b2f6","tarball":"https://registry.npmjs.org/ts-extended-types/-/ts-extended-types-0.10.0.tgz","fileCount":6,"unpackedSize":29536,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVEoMCRA9TVsSAnZWagAAm4AP/A3YpU4hcRC2acchWWOB\ngHjqa3GBZP1AgFzGZQT7EczabuPTqs9Cjm3+uhi9Hzx+rZ73HLPrYU+zS9Fu\n0Wg4mtw/F1oMZRuExx/xdYe4zASgykspixcDfJYQWx9AuHSA8vSgKSI4YQmf\nDr+ePKW4RnR9sM4laodXXkSi0SSh5siPsZcfVzJsbLRoHoEKLXdPPmXCwOeh\nO8VD4m6PerhBzhBpNT8CynJTAOiP6nciJ93TFYwwRZAFGp+RP9qk5CvJliXS\nfdu5+xP8swoMCStbNOFZww4Gv36Vg9kOr90TStwcd8iH3OxAev3HiIVsks6o\nCOrcbtz/87RbUaNTx5EMBF+4lDMp6ZUXvjIvUmzMjc5x3XG0G29jSDzvSpQe\nZwet+b9MTTijNMH9af0q4/kkrZL+l5YTzDZ0LVFcnqCOPTDOZw0Ll8M1H3ir\ngcbvz8RJ0f+2i1uHuy5VJSVj6rZ0j1DFeKrIbKkKqjQb1AIM82KRFIa9ng9S\nDR4UrPCS4r4kNjFEXIWwgEZqERDUcrS85Y9KohPIn/riOg3pzQ/dtdIlpxbf\nrjqtquarbat2oGdWBLOc9Xc+zPUE+lLoEvsf/A0Xlep9rgfEoSLOjlW1Dk/6\nW6rq+OlenRsEpIJUpXPchthg9pMZLM+NooTPlY8SjQadxHu3+s0rtlI0dSTY\nIbaX\r\n=LXab\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID4QZw63GTZjHsdUk5S2vxO8Hb1tjEZKJ2xJ3163vymrAiB5YIxFHRVsziYxcyXKNPL0EzYvLNZG7b0Pjswvoxp6AQ=="}]},"maintainers":[{"name":"juanluispaz","email":"juanluispaz@gmail.com"}],"_npmUser":{"name":"juanluispaz","email":"juanluispaz@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-extended-types_0.10.0_1565805067395_0.15741024592778374"},"_hasShrinkwrap":false},"1.0.0":{"name":"ts-extended-types","version":"1.0.0","description":"Set of complementary basic types related to the ones provided by TypeScript to make your application even more type-safe","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{},"devDependencies":{"typescript":"^4.1.3"},"scripts":{"build":"rm -Rf dist/*; tsc","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/juanluispaz/ts-extended-types.git"},"keywords":["typescript","type","types","int","double","date","local date","time","local time","datetime","date time","local datetime","local date time"],"author":{"name":"Juan Luis Paz Rojas","url":"http://github.com/juanluispaz"},"license":"MIT","bugs":{"url":"https://github.com/juanluispaz/ts-extended-types/issues"},"homepage":"https://github.com/juanluispaz/ts-extended-types","gitHead":"c389e40bbc6df465f551572f8b660408ba2e3186","_id":"ts-extended-types@1.0.0","_nodeVersion":"15.4.0","_npmVersion":"7.0.15","dist":{"integrity":"sha512-Q3PDab5nWjfqzkH1hLJQYE1fmNSGA4pmBvYZw/7K9FuGZ7Nbx9yoMlGmKmsp7gFHgtgKKVVsk2MmpZght6u4Bg==","shasum":"219bd1df43a1b39809eff0b488192573dc7ea354","tarball":"https://registry.npmjs.org/ts-extended-types/-/ts-extended-types-1.0.0.tgz","fileCount":6,"unpackedSize":30076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf63IeCRA9TVsSAnZWagAAQgkP/jGEFpTovCECTKj+rqat\nM12Nc4cxwF94wzxn8C5Xro88aAnoTl12Z1IrY9CIM7osOr+2nlrnycHqv5Nh\nb4iPkCx5Xs33SF7ro41wupGuNHGweCGBn3rvRMQ/EPYJ5buvMyvSNu1aVhGz\nM4FTCUGU3wtHA9MP8JCrN3/RCuXDccKUVsKyW3Atw7lcWaW+PbR0opRHwq0A\nE6pQlpf98NCcdKrxBexxn7loFXtuRa2nHrKgGq0YuBGCsCmyb+UB7FBnKS+d\n+fZ3wPfjomHUEUcmyD612/5NnwyxdcLbDWHsi5Soet2EHiElEP3diU03Ddm4\nAv8fNN8z9IrpSZXZv8CUvV3rvN8f1uTfAZz44rFk14/znW9tqD718Q0o0VLM\nclWUbIy2Z3mgTqV4kYU64cq6i1GAeM8AaSpWBGKeAncooxhNYbvl6lSNaapi\nJ4zJ3L7zHfxhpEyn/Bta35nSgJHTR1pkSFLyCcU7bJw72tzoCQKsBw9Sj7vX\n84zcQcKmgh/C+FN/XtxuKB9cOhSGQ1gXF5c31vSoOWQUlk2/oDgSCXqXeCP1\n/4ZuJWxcPgqWmx6upEJVaG7BaDN3KwO2i+qFATv5rCMmZfHvN9MAv9yvUHtk\n53v2HIRZbT0YP7tsZ/C8xmBVsAZ0ZxtVBziT8vixMwTYF2VQVb8Jk3rGmGlu\nHO/o\r\n=nH5U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG8d1Zxd4lFtFgu/dQQJAN+5TmuFrSNd9TJjlmqdV5/tAiBiCvkN3R06fOXubOJpivpKwiKK0nYZoE24kxvHyQ/OsA=="}]},"_npmUser":{"name":"juanluispaz","email":"juanluispaz@gmail.com"},"directories":{},"maintainers":[{"name":"juanluispaz","email":"juanluispaz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-extended-types_1.0.0_1609265693718_0.7774100219405335"},"_hasShrinkwrap":false},"1.1.0":{"name":"ts-extended-types","version":"1.1.0","description":"Set of complementary basic types related to the ones provided by TypeScript to make your application even more type-safe","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{},"devDependencies":{"typescript":"^4.1.3"},"scripts":{"build":"rm -Rf dist/*; tsc","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/juanluispaz/ts-extended-types.git"},"keywords":["typescript","type","types","int","double","date","local date","time","local time","datetime","date time","local datetime","local date time"],"author":{"name":"Juan Luis Paz Rojas","url":"http://github.com/juanluispaz"},"license":"MIT","bugs":{"url":"https://github.com/juanluispaz/ts-extended-types/issues"},"homepage":"https://github.com/juanluispaz/ts-extended-types","gitHead":"71d109e5fcd1ba8121869ddacfffbae7a0a6bc03","_id":"ts-extended-types@1.1.0","_nodeVersion":"15.4.0","_npmVersion":"7.0.15","dist":{"integrity":"sha512-4+uTpL5eqo/xfYdclDF43IPuflNqzysBH7LJ4ohufjZZAtnEPSS0GOszPEQS1+lg5rXujhAqQ1lAnF6QPCcz5Q==","shasum":"89cf1106a7237e279c62502d18a57abfff9b2459","tarball":"https://registry.npmjs.org/ts-extended-types/-/ts-extended-types-1.1.0.tgz","fileCount":6,"unpackedSize":32430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh03hfCRA9TVsSAnZWagAARz4P/3JMA5G3rbCCnRiVLzwD\nkbJNKSv760IQfChS6ieayRQ4G55CWehf2G/AndGr/ihGX9WrI37a5uKpXDWS\nFkd3tnH89RKIi+2GLB/+T3N0T5kGAs6wxHCOvvIlk4MyZaBTl80GrWOVALLF\ng30PMUyj0E9qfetfAtv4AZ+seK+t9Acc7v55M7hxbeWMLQSU91/BhvhxfXx/\nwy/fVXmsm/CxrpfZWRcAcxk0YNH9EoOPM756SJrxVUL6zUhqPhl2Qj1oQg3I\npuypehJNx36b6WBLWRPPMMU/FIVcRCJx5xhgxvp2mx8vjnpom+xwXt2v2opT\n4E7onTrDMO8xLZl2OlGaQQZRLjvO6mb2IiwxEKIfG9l3q3xInV3UrkmBAp2D\nsV1a0HSZ/xu8IGF1aHoPrneeMW3K22OeBlO/ItQjVI+BNX3ZWczjauRKfbso\nSiLhqGdz0TFnwBQTF3ORpEm+LSITqMhNd5HqOpHy0i585ENZt+Ew2FDHzuV+\nrYahQNPGrGkMnfaI9SjipZD/bR+alrTGSch2/jeJMpPdF20n0N13kvxclVWi\n89BRLFjoZz1ZR7wDUz6UpXxai2fAwXZnGhn8Nab1lUACAxiXIX4ePLbMgc0s\nm/O91lTa61b07ipbeX+IyJkBTO5mvy1unRXM6Hd1EqMUCmfpPVxr16gxefLn\nXalN\r\n=RJ7y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDiJskfQndylu9RC381G8dfJUhSLekPsn66xPp/WAiRHAiAJNH7k1mAMZhDedP2DvY+Pmuf0qJzUEkGdmaVh4kbj0g=="}]},"_npmUser":{"name":"juanluispaz","email":"juanluispaz@gmail.com"},"directories":{},"maintainers":[{"name":"juanluispaz","email":"juanluispaz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-extended-types_1.1.0_1641248863742_0.8319887728704016"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-14T17:51:07.395Z","0.10.0":"2019-08-14T17:51:08.217Z","modified":"2022-05-22T07:09:56.112Z","1.0.0":"2020-12-29T18:14:53.917Z","1.1.0":"2022-01-03T22:27:43.882Z"},"maintainers":[{"name":"juanluispaz","email":"juanluispaz@gmail.com"}],"description":"Set of complementary basic types related to the ones provided by TypeScript to make your application even more type-safe","homepage":"https://github.com/juanluispaz/ts-extended-types","keywords":["typescript","type","types","int","double","date","local date","time","local time","datetime","date time","local datetime","local date time"],"repository":{"type":"git","url":"git+https://github.com/juanluispaz/ts-extended-types.git"},"author":{"name":"Juan Luis Paz Rojas","url":"http://github.com/juanluispaz"},"bugs":{"url":"https://github.com/juanluispaz/ts-extended-types/issues"},"license":"MIT","readme":"\n# ts-extended-types\n\n[![npm](https://img.shields.io/npm/v/ts-extended-types.svg)](http://npm.im/ts-extended-types)\n[![minified size](https://badgen.net/bundlephobia/min/ts-extended-types)](https://bundlephobia.com/result?p=ts-extended-types)\n[![minified & gziped size](https://badgen.net/bundlephobia/minzip/ts-extended-types)](https://bundlephobia.com/result?p=ts-extended-types)\n\nSet of complementary basic types related to the ones provided by TypeScript to make your application even more type-safe\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save ts-extended-types\n```\n\n## Basic usage\n\n```ts\nimport {int, stringInt, double, stringDouble, LocalDate, LocalTime, LocalDateTime, uuid } from 'ts-extended-types';\n\nvar intNumber: int;\nvar veryBigInt: stringInt\nvar doubleNumber: double;\nvar veryBigDoubleNumber: stringDouble\nvar localDate: LocalDate;\nvar localTime: LocalTime;\nvar localDateTime: LocalDateTime;\nvar uuidString: uuid;\n```\n\n## Type definitions\n\n- **`int`**: type that represents a integer number. It can be assigned to a number, but it cannot be assigned from a number.\n- **`stringInt`**: type that represents a integer number. It can be assigned to a number, but it cannot be assigned from a number: it can be so long that can be represented using a string instead of a number.\n- **`double`**: type that represents a floating point number with double precision. It can be assigned to a number, but it cannot be assigned from a number.\n- **`stringDouble`**: type that represents a floating point number with double precision; it can be so long that can be represented using a string instead of a number.\n- **`LocalDate`**: type that represents a local date without time (without timezone). **Provided methods**:\n\t- **`getFullYear(): int`**: Gets the year\n\t- **`getMonth(): int`**: Gets the month (value between 0 to 11)\n\t- **`getDate(): int`**: Gets the day-of-the-month\n\t- **`getDay(): int`**: Gets the day of the week (0 represents Sunday)\n- **`LocalTime`**: type that represents a local time without date (without timezone). **Provided methods**:\n\t- **`getHours(): int`**: Gets the hours\n\t- **`getMinutes(): int`**: Gets the minutes\n\t- **`getSeconds(): int`**: Gets the seconds\n\t- **`getMilliseconds(): int`**: Gets the milliseconds\n- **`LocalDateTime`**: type that represents a local date with time (without timezone). **Provided methods**: all methods provided by `LocalDate` and `LocalTime` plus:\n\t- **`getTime(): int`**: Gets the time value in milliseconds\n- **`uuid`**: type that represents an uuid string. It can be assigned to a string, but it cannot be assigned from a string.\n\n**Note**: \n- In JavaScript `int` or `double` don't exists, all of these values are represented using a `number`.\n- In JavaScript `stringInt` or `stringDouble` don't exists, all of these values are represented using a `number` or a `string`.\n- In JavaScript `LocalDate`, `LocalTime` or `LocalDateTime` don't exists, all of these values are represented using the `Date` object.\n- In JavaScript `uuid` don't exists, this value is represented using a `string`.\n\n## Provided functions\n\n### Provided int functions\n\n- **`isInt(value: any) => value is int`**: Returns `true` if the value is a `int` number, otherwise returns `false`.\n- **`asInt(value: number) => int`**:  Cast the number provided by argument as `int`, throws an error if the provided number is not an integer.\n- **`roundToInt(value:  number) =>  int`**: Round the provided number to an integer and then cast it to `int`.\n- **`truncateToInt(value: number) => int`**: Truncate the provided number to an integer and then cast it to `int`.\n- **`floorToInt(value: number) => int`**: Floor the provided number to an integer and then cast it to `int`.\n- **`ceilToInt(value: number) => int`**: Ceil the provided number to an integer and then cast it to `int`.\n\n### Provided stringInt functions\n\n- **`isStringInt(value: any) => value is stringInt`**: Returns `true` if the value is a `stringInt` number, otherwise returns `false`.\n- **`asStringInt(value: number|string) => stringInt`**:  Cast the number provided by argument as `stringInt`, throws an error if the provided number is not an integer.\n- **`roundToStringInt(value:  number) =>  stringInt`**: Round the provided number to an integer and then cast it to `stringInt`.\n- **`truncateToStringInt(value: number) => stringInt`**: Truncate the provided number to an integer and then cast it to `stringInt`.\n- **`floorToStringInt(value: number) => stringInt`**: Floor the provided number to an integer and then cast it to `stringInt`.\n- **`ceilToStringInt(value: number) => stringInt`**: Ceil the provided number to an integer and then cast it to `stringInt`.\n\n### Provided double functions\n\n- **`isDouble(value: any) => value is double`**: Returns `true` if the value is a `double` precision number, otherwise returns `false`.\n- **`asDouble(value: number) => double`**:  Cast the number provided by argument as `double`.\n\n### Provided stringDouble functions\n\n- **`isStringDouble(value: any) => value is stringDouble`**: Returns `true` if the value is a `stringDouble` precision number, otherwise returns `false`.\n- **`asStringDouble(value: number|string) => double`**:  Cast the number provided by argument as `stringDouble`, throws an error if the provided number is not a double.\n\n### Provided LocalDate functions\n\n- **`createLocalDate() => LocalDate`**: create a new `LocalDate` with the current date.\n- **`createLocalDate(date: Date) => LocalDate`**: create a new `LocalDate` with the same date provided by argument.\n- **`createLocalDate(year: number, month: number, date: number) => LocalDate`**:  create a new `LocalDate` with the year, month and date (day of the month) provided by arguments.\n- **`isLocalDate(value: any) => value is LocalDate`**: Returns `true` if the value is a `LocalDate`, otherwise returns `false`\n\n### Provided LocalTime functions\n\n- **`createLocalTime() => LocalTime`**: create a new `LocalTime` with the current time.\n- **`createLocalTime(date: Date) => LocalTime`**: create a new `LocalTime` with the same time provided by argument.\n- **`createLocalTime(hours: number, minutes?: number, seconds?: number, milliseconds?: number) => LocalTime`**:  create a new `LocalTime` with the hours, minutes, seconds and milliseconds provided by arguments.\n- **`isLocalTime(value: any) => value is LocalTime`**: Returns `true` if the value is a `LocalTime`, otherwise returns `false`\n\n### Provided LocalDateTime functions\n\n- **`createLocalDateTime() => LocalDateTime`**: create a new `LocalDate` with the current date and time.\n- **`createLocalDateTime(date: Date) => LocalDateTime`**: create a new `LocalDateTime` with the same date and time provided by argument.\n- **`createLocalDateTime(year: number, month: number, date: number, hours?: number, minutes?: number, seconds?: number, milliseconds?: number) => LocalDateTime`**:  create a new `LocalDateTime` with the year, month, date (day of the month), hours, minutes, seconds and milliseconds provided by arguments.\n- **`isLocalDate(value: any) => value is LocalDate`**: Returns `true` if the value is a `LocalDate`, otherwise returns `false`\n\n### Provided uuid functions\n\n- **`isUuid(value: any) => value is uuid`**: Returns `true` if the value is an `uuid` string, otherwise returns `false`.\n- **`asUuid(value: string) => uuid`**: Cast the string provided by argument as `uuid`, throws an error if the provided string is not an uuid.\n\n## License\n\nMIT\n\n<!--\nEdited with: https://stackedit.io/app\n-->","readmeFilename":"README.md"}