{"_id":"knockout-mapping","_rev":"13-5104d4eb5bbdb35d127a058d9112e6a3","name":"knockout-mapping","time":{"modified":"2022-06-19T09:05:07.565Z","created":"2012-11-16T12:38:55.441Z","2.3.2":"2012-11-16T12:38:58.194Z","2.5.0":"2015-02-12T10:36:11.892Z","2.6.0":"2016-02-28T12:44:57.113Z"},"maintainers":[{"name":"crissdev","email":"criss.trifan@gmail.com"}],"dist-tags":{"latest":"2.6.0"},"description":"Knockout Mapping plugin","readme":"# knockout.mapping\n\n[![Build Status](https://travis-ci.org/crissdev/knockout.mapping.svg?branch=master)](https://travis-ci.org/crissdev/knockout.mapping)\n[![npm version](https://badge.fury.io/js/knockout-mapping.svg)](http://badge.fury.io/js/knockout-mapping)\n\n\n> Object mapping plugin for [Knockout](http://knockoutjs.com/)\n\n\n## Documentation\n\nOfficial documentation [here](http://knockoutjs.com/documentation/plugins-mapping.html).\n\n\n## Install\n\n#### Bower\n\n```sh\nbower install bower-knockout-mapping --save-dev\n```\n\n#### NPM\n\n```sh\nnpm install knockout-mapping --save\n```\n\n\n## Quick Start\n\n```js\n\nvar data = {\n    email: 'demo@example.com',\n    name: 'demo',\n    addresses: [\n        { type: 'home', country: 'Romania', city: 'Cluj' },\n        { type: 'work', country: 'Spain', city: 'Barcelona' }\n    ]\n};\n\n// Create a view model from data\nvar viewModel = ko.mapping.fromJS(data);\n\n// Now use the viewModel to change some values (properties are now observable)\nviewModel.email('demo2@example.com');\nviewModel.name('demo2');\nviewModel.addresses()[0].city('Bucharest');\n\n// Retrieve the updated data (as JS object)\nvar newData = ko.mapping.toJS(viewModel);\n\n// newData now looks like this\n{\n  email: 'demo2@example.com',\n  name: 'demo2',\n  addresses: [\n    { type: 'home', country: 'Romania', city: 'Bucharest' },\n    { type: 'work', country: 'Spain', city: 'Barcelona' }\n  ]\n}\n\n```\n\nRun this example in [JSFiddle](http://jsfiddle.net/wmeqx7ss/141/).\n\n\n## Test\n\nContinuous Integration tests are done with Travis, and the associated Gulp task is `test-ci`.\nFor development `test` task is used, which runs the tests against the latest version of Knockout.\n\n\n## License\n\n[MIT](http://www.opensource.org/licenses/mit-license.php)\n","versions":{"2.5.0":{"name":"knockout-mapping","version":"2.5.0","description":"Knockout Mapping plugin","main":"dist/knockout.mapping.js","files":["dist","HISTORY.md"],"keywords":["knockout","mapping","knockout-mapping","knockout.mapping","plugin","ko"],"peerDependencies":{"knockout":">=2.2.0"},"devDependencies":{"del":"^1.1.1","gulp":"^3.8.11","gulp-header":"^1.2.2","gulp-if":"^1.2.5","gulp-jshint":"^1.9.2","gulp-plumber":"^0.6.6","gulp-qunit":"^1.2.1","gulp-rename":"^1.2.0","gulp-replace":"^0.5.2","gulp-sourcemaps":"^1.3.0","gulp-uglify":"^1.1.0","jshint-stylish":"^1.0.0"},"scripts":{"test":"gulp test-ci"},"repository":{"type":"git","url":"https://github.com/crissdev/knockout.mapping.git"},"bugs":{"url":"https://github.com/crissdev/knockout.mapping/issues"},"license":"MIT","gitHead":"2c6a7b60b4fa15e3038f4a4b2fe9095d79bcfdfe","homepage":"https://github.com/crissdev/knockout.mapping","_id":"knockout-mapping@2.5.0","_shasum":"3121b43bb5801f7d7f2c5a909fdf367a41eab974","_from":".","_npmVersion":"2.5.0","_nodeVersion":"0.10.36","_npmUser":{"name":"crissdev","email":"criss.trifan@gmail.com"},"maintainers":[{"name":"crissdev","email":"criss.trifan@gmail.com"}],"dist":{"shasum":"3121b43bb5801f7d7f2c5a909fdf367a41eab974","tarball":"https://registry.npmjs.org/knockout-mapping/-/knockout-mapping-2.5.0.tgz","integrity":"sha512-dZfbgFnUvWS/qBnh8g//hAxfgTFx2taH8JoYgg/uLkTYccXR7zVEDqgWWskDfEjjdftOyi1TrIG6iYtkmkKR5g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHkD5qctZQHedip6a2UYPKpppfI6RMSZc0neWOuEq+WcAiEAgCn3E3xvmyFXtrEKTz4VOfGkh1JvRc6QXVx0N/yxVxY="}]}},"2.6.0":{"name":"knockout-mapping","version":"2.6.0","description":"Knockout Mapping plugin","main":"dist/knockout.mapping.js","files":["dist","HISTORY.md"],"keywords":["knockout","mapping","knockout-mapping","knockout.mapping","plugin","ko"],"peerDependencies":{"knockout":">=2.2.0"},"devDependencies":{"del":"^2.0.2","gulp":"^3.8.11","gulp-header":"^1.2.2","gulp-if":"^2.0.0","gulp-jshint":"^2.0.0","gulp-plumber":"^1.0.1","gulp-qunit":"^1.2.1","gulp-rename":"^1.2.0","gulp-replace":"^0.5.3","gulp-sourcemaps":"^1.3.0","gulp-uglify":"^1.1.0","jshint":"^2.9.1","jshint-stylish":"^2.0.1"},"scripts":{"test":"gulp test-ci"},"repository":{"type":"git","url":"git+https://github.com/crissdev/knockout.mapping.git"},"bugs":{"url":"https://github.com/crissdev/knockout.mapping/issues"},"license":"MIT","gitHead":"a7db943282c97dcc5a618c0bfe82a8de1948a694","homepage":"https://github.com/crissdev/knockout.mapping#readme","_id":"knockout-mapping@2.6.0","_shasum":"052759d01ecf30d4947e8ebe64ad2c82933f06ff","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"crissdev","email":"criss.trifan@gmail.com"},"dist":{"shasum":"052759d01ecf30d4947e8ebe64ad2c82933f06ff","tarball":"https://registry.npmjs.org/knockout-mapping/-/knockout-mapping-2.6.0.tgz","integrity":"sha512-Q4dh1RSU/54TRCbZCYCBHC462T64fgnYly6UOyzDA2h8CEgthtN/AL6rXYVmoKYTbRtfvVHyLalKztVOe85Pmw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHQTjNTGVddukcAnTQwYeECGUmXr9eukQRAy6IGE/5V1AiANNFk+YIUEZx+4sfpyT74dVzkSkh5SRBZFBGCY2AQTww=="}]},"maintainers":[{"name":"crissdev","email":"criss.trifan@gmail.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/knockout-mapping-2.6.0.tgz_1456663493868_0.002171279862523079"}}},"homepage":"https://github.com/crissdev/knockout.mapping#readme","keywords":["knockout","mapping","knockout-mapping","knockout.mapping","plugin","ko"],"repository":{"type":"git","url":"git+https://github.com/crissdev/knockout.mapping.git"},"bugs":{"url":"https://github.com/crissdev/knockout.mapping/issues"},"license":"MIT","readmeFilename":"README.md","users":{"retorillo":true,"coachshea":true}}