{"_id":"@aetherwave/object-mapper","_rev":"3-1a349cda0ecc0c16e54700943e9c223a","name":"@aetherwave/object-mapper","description":"Maps objects by dot notation","dist-tags":{"latest":"2.0.1"},"versions":{"2.0.1":{"name":"@aetherwave/object-mapper","version":"2.0.1","description":"Maps objects by dot notation","main":"index.js","scripts":{"test":"istanbul cover _mocha --report html --dir ./report/coverage"},"repository":{"type":"git","url":"git+https://github.com/aetherwave/object-mapper.git"},"keywords":["map","object","dot-notation","mapper"],"author":{"name":"Thomas Schorn"},"license":"ISC","bugs":{"url":"https://github.com/aetherwave/object-mapper/issues"},"homepage":"https://github.com/aetherwave/object-mapper","devDependencies":{"chai":"^3.3.0","istanbul":"^0.3.13","mocha":"^2.2.4"},"dependencies":{"lodash":"^3.10.1"},"gitHead":"8e7c2c127da3f5d3248eb7b4057ebf1b0896b4b4","_id":"@aetherwave/object-mapper@2.0.1","_shasum":"40120dff3ca6f5cf8af02dbc6d93c0da1879fc0e","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"aetherwave","email":"support@aetherwave.at"},"dist":{"shasum":"40120dff3ca6f5cf8af02dbc6d93c0da1879fc0e","tarball":"https://registry.npmjs.org/@aetherwave/object-mapper/-/object-mapper-2.0.1.tgz","integrity":"sha512-ibAUxtky/1TpAg6lduEtU1hUbP3WZWHnpb6mKc7Igc40zIH9l6L9PDJ/XfN8WdIp6y8Lbf4f3QxBJI8t6Ddw5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBgo9TJuJxE1E+vIlQYQqqws8PIYutxL4QBYjzVtQINjAiEA77hJ52+1Jz+R8NhPvjADR2raxn0n3fYTh/epLrwFXik="}]},"maintainers":[{"name":"aetherwave","email":"support@aetherwave.at"}]}},"readme":"# Object Mapper\n\n[![Build Status](https://travis-ci.org/Aetherwave/object-mapper.svg)](https://travis-ci.org/Aetherwave/object-mapper)\n\nMaps objects by dot notation\n\n## Installation\n\n    npm install @aetherwave/object-mapper\n\n## Usage\n\n### ObjectMapper#constructor(mapSchema[, options])\n\n- `mapSchema`: map schema\n- `options`: (optional) configuration\n  - `context`: Object, context, default: `{}`\n  - `mapEachElement`: Boolean, error if map path doesn't exist, default: `false`\n  - `stripEmptyObjects`: Boolean, ignore empty objects, default: `true`\n\n### ObjectMapper#map(mixed[, mapSchema])\n\n- `mixed`: object to map\n- `mapSchema`: map schema, default (this.mapSchema)\n\n### Map Schema\n\n    {\n      <string: destination name>: <string: source path>,\n      <string: destination name>: <string: '$.' + context source path>,\n      <string: destination name>: <object: nested schema>\n    }\n\n### Example\n\n    var ObjectMapper = require('@schornio/object-mapper');\n\n    var obj = {\n      simpleProperty: 42,\n      complexProperty: {\n        child: 126\n      }\n    };\n\n    var map = {\n      flattern: 'complexProperty.child',\n      explode: {\n        child: 'simpleProperty'\n      }\n    };\n\n    var objMap = new MapObjLib(map);\n    objMap.map(obj);\n      /* result == {\n        flattern: 126,\n        explode: {\n          child: 42\n        }\n      }*/\n    });\n\n## Test\n\n    npm test\n","maintainers":[{"name":"aetherwave","email":"support@aetherwave.at"}],"time":{"modified":"2022-06-12T14:20:15.595Z","created":"2015-10-18T16:50:55.361Z","2.0.1":"2015-10-18T16:50:55.361Z"},"homepage":"https://github.com/aetherwave/object-mapper","keywords":["map","object","dot-notation","mapper"],"repository":{"type":"git","url":"git+https://github.com/aetherwave/object-mapper.git"},"author":{"name":"Thomas Schorn"},"bugs":{"url":"https://github.com/aetherwave/object-mapper/issues"},"license":"ISC","readmeFilename":"README.md"}