{"_id":"@blinkmobile/cast-property-types","_rev":"11-bab2eef94af527fc77d97cf9c1838b74","name":"@blinkmobile/cast-property-types","description":"coerce properties within an Object to other types","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@blinkmobile/cast-property-types","version":"1.0.0","description":"coerce properties within an Object to other types","main":"index.js","scripts":{"build":"browserify -s castPropertyTypes  -e . -o dist/index.js","pretest":"npm run build","test":"eslint . && istanbul cover test"},"repository":{"type":"git","url":"git+https://github.com/blinkmobile/cast-property-types.js.git"},"keywords":["coerce","cast","types"],"author":{"name":"Ron Waldon","url":"https://github.com/jokeyrhyme"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/blinkmobile/cast-property-types.js/issues"},"homepage":"https://github.com/blinkmobile/cast-property-types.js#readme","devDependencies":{"browserify":"^10.2","eslint":"^0.23.0","eslint-config-semistandard":"^4.0","eslint-config-standard":"^3.3","istanbul":"^0.3.15","tape":"^4.0","tape-chai":"^1.1"},"files":["dist/index.js","index.js","LICENSE","README.md"],"gitHead":"f7a83665cbcf16b3414d131c5ec56713ea4198f1","_id":"@blinkmobile/cast-property-types@1.0.0","_shasum":"345329cef27847a20112793b58b130db628d42eb","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.4","_npmUser":{"name":"blinkmobile","email":"ron@blinkmobile.com.au"},"dist":{"shasum":"345329cef27847a20112793b58b130db628d42eb","tarball":"https://registry.npmjs.org/@blinkmobile/cast-property-types/-/cast-property-types-1.0.0.tgz","integrity":"sha512-ATmok8ZqD4NnYSucd+JqVbLQzfoPy2yp/jwqFU0ffH20RWUePGIqVXknPUSqHrgg0P1SvGUwCVDWlyNCnalKPw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFgfegMAKsC56q20bEArYYBGfiI0+KbotgzTvw6u3PhoAiAR2e/jGoZzr6vZm2Kh5aoqCQTbsDyQPfZuLDHtS0YKZQ=="}]},"maintainers":[{"name":"blinkmobile","email":"ron@blinkmobile.com.au"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"readme":"# cast-property-types.js\n\ncoerce properties within an Object to other types\n\n[![npm module](https://img.shields.io/npm/v/blinkmobile/cast-property-types.svg)](https://www.npmjs.com/package/blinkmobile/cast-property-types)\n\n[![travis-ci](https://img.shields.io/travis/blinkmobile/cast-property-types.js.svg)](https://travis-ci.org/blinkmobile/cast-property-types.js)\n\n\n## What is this?\n\nThis is a utility function to take an Object that has properties with String\nvalues, and cast those Strings to other type (e.g. Booleans and Numbers).\n\n\n## API\n\n### `castPropertyTypes()`\n\n- @param {Object} input key-value pairs to cast\n- @param {Object} example key-value pairs where values are of desired types\n- @returns {Object} a new Object with same properties as input but with cast values\n\n`castPropertyTypes()` will take the values from the first parameter, and cast\nthose values using the types found in the second parameter.\n\nFor example, `castPropertyTypes({ value: '123' }, { value: 0 })` will return:\n\n```json\n{\n  \"value\": 123\n}\n```\n\nWe use the built-in `parseFloat()` method to cast values to a Number, so be\naware that values that are not numeric may have unexpected results.\n","maintainers":[{"email":"aaronroworth@gmail.com","name":"aaronroworth"},{"email":"ron@blinkmobile.com.au","name":"blinkmobile-admin"},{"email":"kizaonline@gmail.com","name":"kizaonline"},{"email":"matt.carroll139@gmail.com","name":"mymattcarroll"},{"email":"simondobie23@gmail.com","name":"simon_marklar"}],"time":{"modified":"2023-08-23T01:37:57.935Z","created":"2015-06-19T05:46:03.577Z","1.0.0":"2015-06-19T05:46:03.577Z"},"homepage":"https://github.com/blinkmobile/cast-property-types.js#readme","keywords":["coerce","cast","types"],"repository":{"type":"git","url":"git+https://github.com/blinkmobile/cast-property-types.js.git"},"author":{"name":"Ron Waldon","url":"https://github.com/jokeyrhyme"},"bugs":{"url":"https://github.com/blinkmobile/cast-property-types.js/issues"},"license":"BSD-3-Clause","readmeFilename":"README.md"}