{"_id":"@blinkmobile/varied-definition","_rev":"12-f8a27c3f82a16112f60afdd2e4f03fa4","name":"@blinkmobile/varied-definition","description":"manipulate and flatten definition Objects that include one or more variations","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@blinkmobile/varied-definition","version":"1.0.0","description":"manipulate and flatten definition Objects that include one or more variations","main":"index.js","scripts":{"build":"browserify -s variedDefinition -e . -o dist/index.js","pretest":"npm run build","test":"eslint . && istanbul cover test"},"repository":{"type":"git","url":"git+https://github.com/blinkmobile/varied-definition.js.git"},"keywords":["object","definition","flatten"],"author":{"name":"Ron Waldon","url":"https://github.com/jokeyrhyme"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/blinkmobile/varied-definition.js/issues"},"homepage":"https://github.com/blinkmobile/varied-definition.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"],"dependencies":{"cyclonejs":"1.1.2"},"gitHead":"b12796f60dd6fcb43d30086e1b21bda0d833a334","_id":"@blinkmobile/varied-definition@1.0.0","_shasum":"2c93ecced292ed63d97dc90849da163efe040f52","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.4","_npmUser":{"name":"blinkmobile","email":"ron@blinkmobile.com.au"},"dist":{"shasum":"2c93ecced292ed63d97dc90849da163efe040f52","tarball":"https://registry.npmjs.org/@blinkmobile/varied-definition/-/varied-definition-1.0.0.tgz","integrity":"sha512-9musA8gFzLd7ykJQbL3Sds0NvOJVeSf+mVxIED7WzEy4weVhVa+2WbB92XYxG5QW3xhgje8Xgui8KisdZ3SIhQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGKvTuX1lGD2+JOe9meywzpBedai0Cmu6S2v1FX7U6VcAiEAqvYp7T4ebF0RA3SQydfJDhZyz9vajzoQvm014QJ3bSk="}]},"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."},"1.1.0":{"name":"@blinkmobile/varied-definition","version":"1.1.0","description":"manipulate and flatten definition Objects that include one or more variations","main":"index.js","scripts":{"build":"browserify -s variedDefinition -e . -o dist/index.js","pretest":"npm run build","test":"eslint . && istanbul cover test"},"repository":{"type":"git","url":"git+https://github.com/blinkmobile/varied-definition.js.git"},"keywords":["object","definition","flatten"],"author":{"name":"Ron Waldon","url":"https://github.com/jokeyrhyme"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/blinkmobile/varied-definition.js/issues"},"homepage":"https://github.com/blinkmobile/varied-definition.js#readme","devDependencies":{"browserify":"^10.2","eslint":"^1.0","eslint-config-semistandard":"^5.0.0","eslint-config-standard":"^4.0.0","eslint-plugin-standard":"^1.2.0","istanbul":"^0.3.15","tape":"^4.0","tape-chai":"^1.1"},"files":["dist/index.js","index.js","LICENSE","README.md"],"dependencies":{},"gitHead":"98b2e97af3faf25962fd86cc3e313247ed0baf8a","_id":"@blinkmobile/varied-definition@1.1.0","_shasum":"f51dc84517b67ca49fd0e8fdce4e61cc12babd24","_from":".","_npmVersion":"3.5.4","_nodeVersion":"4.1.0","_npmUser":{"name":"simon_marklar","email":"simondobie23@gmail.com"},"dist":{"shasum":"f51dc84517b67ca49fd0e8fdce4e61cc12babd24","tarball":"https://registry.npmjs.org/@blinkmobile/varied-definition/-/varied-definition-1.1.0.tgz","integrity":"sha512-tbsjCWgAuSpJzZqFJ7XfW09vzA/aPDvDcmoPU4mDYF6z25Lz5JzjrN6jDpXt1ZtLvtMF+qwF8Xya15HqcaTL6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICa13BR6cFPcmNsKuVjvHCFh9RP+tkyXNU0OMCm5KVIeAiBtntwBqknkmZh3gOP09DgGHCqmxbduNMjGZQaA+LX0vQ=="}]},"maintainers":[{"name":"blinkmobile","email":"ron@blinkmobile.com.au"},{"name":"jokeyrhyme","email":"jokeyrhyme@gmail.com"},{"name":"simon_marklar","email":"simondobie23@gmail.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"readme":"# varied-definition.js\r\n\r\nmanipulate and flatten definition Objects that include one or more variations\r\n\r\n[![npm module](https://img.shields.io/npm/v/@blinkmobile/varied-definition.svg)](https://www.npmjs.com/package/@blinkmobile/varied-definition)\r\n[![travis-ci](https://img.shields.io/travis/blinkmobile/varied-definition.js.svg)](https://travis-ci.org/blinkmobile/varied-definition.js)\r\n\r\n\r\n## What is this?\r\n\r\nThis project provides helper functions for consuming a definition and extracting\r\na specific variation out of one or more possible configurations.\r\n\r\n### What is a \"configuration\"?\r\n\r\nA configuration is just an Object with properties and values, where that\r\nspecific combination of properties and values relates to specific purpose.\r\n\r\n### What is a \"variation\"?\r\n\r\nA variation is a named configuration, i.e. different in some ways and similar in\r\nother ways to another configuration.\r\n\r\n### What is a \"definition\"?\r\n\r\nA definition is an Object with properties that are variations. There must be a\r\nvariation named \"default\". Other variations within the same definition may then\r\nspecify how they differ from the default.\r\n\r\nThe default configuration Object must have a \"name\" property. Declaring a\r\nvariation that changes the \"name\" property is not recommended.\r\n\r\nThe goal is to save transmission and storage size by putting common values in\r\nthe default variation, and just the differences in the other variations.\r\n\r\nFor low-level validation, see the\r\n[JSON Schema specification](http://json-schema.org/) and our JSON\r\n[schema](docs/schema.json).\r\n\r\nSee the [docs](docs) directory for more details.\r\n\r\n\r\n## API\r\n\r\nThis module exports an Object with the following function(s) ...\r\n\r\n### `flatten()`\r\n\r\n- @param {Object} def a definition with a default and zero or more variations\r\n- @param {String} [variation] the specific variation desired\r\n- @param {FlattenOptions} [options] other parameters\r\n- @throws {TypeError} if the definition doesn't meet our above requirements\r\n- @return {Object} configuration for a single variation\r\n\r\n#### @typedef FlattenOptions\r\n- @type {Object}\r\n- @property {String[]} [nesting] properties within the default configuration\r\n- @property {String[]} [selection] properties within other configurations\r\n\r\nSee our documentation on [nesting configurations](docs/nested-definitions.md).\r\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:43:44.515Z","created":"2015-06-21T22:16:14.376Z","1.0.0":"2015-06-21T22:16:14.376Z","1.1.0":"2016-01-27T01:03:40.673Z"},"homepage":"https://github.com/blinkmobile/varied-definition.js#readme","keywords":["object","definition","flatten"],"repository":{"type":"git","url":"git+https://github.com/blinkmobile/varied-definition.js.git"},"author":{"name":"Ron Waldon","url":"https://github.com/jokeyrhyme"},"bugs":{"url":"https://github.com/blinkmobile/varied-definition.js/issues"},"license":"BSD-3-Clause","readmeFilename":"README.md"}