{"_id":"map-schema","_rev":"101767","name":"map-schema","description":"Normalize an object by running normalizers and validators that are mapped to a schema.","dist-tags":{"latest":"0.3.0"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:35:35.000Z","created":"2016-01-17T22:49:58.607Z","0.3.0":"2020-03-02T01:46:37.965Z","0.2.4":"2017-01-30T16:06:39.440Z","0.2.3":"2016-04-03T19:39:28.109Z","0.2.2":"2016-03-27T14:21:32.680Z","0.2.1":"2016-03-23T18:06:15.165Z","0.2.0":"2016-03-19T13:38:25.260Z","0.1.4":"2016-03-05T20:07:22.767Z","0.1.3":"2016-02-17T21:07:25.606Z","0.1.1":"2016-01-17T22:54:13.679Z","0.1.0":"2016-01-17T22:49:58.607Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/map-schema.git"},"versions":{"0.3.0":{"name":"map-schema","description":"Normalize an object by running normalizers and validators that are mapped to a schema.","version":"0.3.0","homepage":"https://github.com/jonschlinkert/map-schema","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/map-schema.git"},"bugs":{"url":"https://github.com/jonschlinkert/map-schema/issues"},"license":"MIT","main":"index.js","engines":{"node":">=10"},"scripts":{"test":"mocha"},"dependencies":{"arr-union":"^3.1.0","collection-visit":"^1.0.0","debug":"^4.1.1","define-property":"^2.0.2","extend-shallow":"^3.0.2","get-value":"^3.0.1","is-primitive":"^3.0.1","kind-of":"^6.0.3","longest":"^2.0.1","mixin-deep":"^2.0.1","object.omit":"^3.0.0","object.pick":"^1.3.0","omit-empty":"^1.0.0","pad-right":"^0.2.2","set-value":"^3.0.1","sort-object-arrays":"^0.1.1","union-value":"^2.0.1"},"devDependencies":{"gulp-format-md":"^2.0.0","isobject":"^4.0.0","mocha":"^7.1.0"},"keywords":["map","schema"],"verb":{"run":true,"toc":"collapsible","layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"highlight":"normalize-pkg","list":["get-value","normalize-pkg","object.omit","object.pick","set-value"]},"reflinks":["isobject","normalize-pkg","verb"],"lint":{"reflinks":true}},"gitHead":"38b8065ad47a77e8d0253301311e5b150ff852aa","_id":"map-schema@0.3.0","_nodeVersion":"13.9.0","_npmVersion":"6.13.7","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"22b62c031d8f64e6f4ac3e66e9cae7e93424b616","size":9482,"noattachment":false,"key":"/map-schema/-/map-schema-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/map-schema/download/map-schema-0.3.0.tgz"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/map-schema_0.3.0_1583113597828_0.5327285289426291"},"_hasShrinkwrap":false,"publish_time":1583113597965,"_cnpm_publish_time":1583113597965},"0.2.4":{"name":"map-schema","description":"Normalize an object by running normalizers and validators that are mapped to a schema.","version":"0.2.4","homepage":"https://github.com/jonschlinkert/map-schema","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/map-schema.git"},"bugs":{"url":"https://github.com/jonschlinkert/map-schema/issues"},"license":"MIT","files":["index.js","lib"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"arr-union":"^3.1.0","collection-visit":"^0.2.3","component-emitter":"^1.2.1","debug":"^2.6.0","define-property":"^0.2.5","extend-shallow":"^2.0.1","get-value":"^2.0.6","is-primitive":"^2.0.0","kind-of":"^3.1.0","lazy-cache":"^2.0.2","log-utils":"^0.2.1","longest":"^1.0.1","mixin-deep":"^1.1.3","object.omit":"^2.0.1","object.pick":"^1.2.0","omit-empty":"^0.4.1","pad-right":"^0.2.2","set-value":"^0.4.0","sort-object-arrays":"^0.1.1","union-value":"^0.2.3"},"devDependencies":{"gulp":"^3.9.1","gulp-eslint":"^3.0.1","gulp-format-md":"^0.1.11","gulp-istanbul":"^1.1.1","gulp-mocha":"^3.0.1","isobject":"^3.0.0","mocha":"^3.2.0"},"keywords":["map","schema"],"verb":{"run":true,"toc":"collapsible","layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"highlight":"normalize-pkg","list":["get-value","normalize-pkg","object.omit","object.pick","set-value"]},"reflinks":["isobject","normalize-pkg","verb"],"lint":{"reflinks":true}},"gitHead":"a469b067ad85ae58da4822343c009577197dafab","_id":"map-schema@0.2.4","_shasum":"c19551834fc3c07a04597b7a5afb44a475af95b4","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"c19551834fc3c07a04597b7a5afb44a475af95b4","size":9401,"noattachment":false,"key":"/map-schema/-/map-schema-0.2.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/map-schema/download/map-schema-0.2.4.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/map-schema-0.2.4.tgz_1485792397542_0.5422337541822344"},"directories":{},"publish_time":1485792399440,"_cnpm_publish_time":1485792399440,"_hasShrinkwrap":false},"0.2.3":{"name":"map-schema","description":"Normalize an object by running normalizers and validators that are mapped to a schema.","version":"0.2.3","homepage":"https://github.com/jonschlinkert/map-schema","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/map-schema.git"},"bugs":{"url":"https://github.com/jonschlinkert/map-schema/issues"},"license":"MIT","files":["index.js","lib/"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"arr-union":"^3.0.0","collection-visit":"^0.2.1","component-emitter":"^1.2.0","debug":"^2.2.0","define-property":"^0.2.5","get-value":"^2.0.2","is-primitive":"^2.0.0","kind-of":"^3.0.2","lazy-cache":"^1.0.3","log-utils":"^0.1.0","longest":"^1.0.1","mixin-deep":"^1.1.3","object.omit":"^2.0.0","object.pick":"^1.1.2","omit-empty":"^0.3.2","pad-right":"^0.2.2","set-value":"^0.3.2","sort-object-arrays":"^0.1.1","union-value":"^0.2.1"},"devDependencies":{"gulp":"^3.9.0","gulp-eslint":"^1.1.1","gulp-format-md":"^0.1.4","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","isobject":"^2.0.0","mocha":"*"},"keywords":["map","schema"],"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"highlight":"normalize-pkg","list":["get-value","set-value","object.omit","object.pick","normalize-pkg"]},"reflinks":["normalize-pkg","isobject","verb"],"lint":{"reflinks":true}},"gitHead":"bc57daec363c352bfe2f7942a60317ebde06fea4","_id":"map-schema@0.2.3","_shasum":"0a29556761bcff23a3eb6bb5f2c721901f9f3a93","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"0a29556761bcff23a3eb6bb5f2c721901f9f3a93","size":8953,"noattachment":false,"key":"/map-schema/-/map-schema-0.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/map-schema/download/map-schema-0.2.3.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/map-schema-0.2.3.tgz_1459712365639_0.8106566064525396"},"directories":{},"publish_time":1459712368109,"_cnpm_publish_time":1459712368109,"_hasShrinkwrap":false},"0.2.2":{"name":"map-schema","description":"Normalize an object by running normalizers and validators that are mapped to a schema.","version":"0.2.2","homepage":"https://github.com/jonschlinkert/map-schema","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/map-schema.git"},"bugs":{"url":"https://github.com/jonschlinkert/map-schema/issues"},"license":"MIT","files":["index.js","lib/"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"arr-union":"^3.0.0","collection-visit":"^0.2.1","component-emitter":"^1.2.0","debug":"^2.2.0","get-value":"^2.0.2","is-primitive":"^2.0.0","kind-of":"^3.0.2","lazy-cache":"^1.0.3","log-utils":"^0.1.0","longest":"^1.0.1","mixin-deep":"^1.1.3","object.omit":"^2.0.0","object.pick":"^1.1.2","omit-empty":"^0.3.2","pad-right":"^0.2.2","set-value":"^0.3.2","sort-object-arrays":"^0.1.1","union-value":"^0.2.1"},"devDependencies":{"gulp":"^3.9.0","gulp-eslint":"^1.1.1","gulp-format-md":"^0.1.4","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","isobject":"^2.0.0","mocha":"*"},"keywords":["map","schema"],"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"highlight":"normalize-pkg","list":["get-value","set-value","object.omit","object.pick","normalize-pkg"]},"reflinks":["normalize-pkg","isobject","verb"],"lint":{"reflinks":true}},"gitHead":"8fbf778244c2726a7caf1e819afd53924cb47f37","_id":"map-schema@0.2.2","_shasum":"ac10853eadaeaed2eeadd05cfc237af4b8b81c8b","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"ac10853eadaeaed2eeadd05cfc237af4b8b81c8b","size":8910,"noattachment":false,"key":"/map-schema/-/map-schema-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/map-schema/download/map-schema-0.2.2.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/map-schema-0.2.2.tgz_1459088490344_0.6099539147689939"},"directories":{},"publish_time":1459088492680,"_cnpm_publish_time":1459088492680,"_hasShrinkwrap":false},"0.2.1":{"name":"map-schema","description":"Normalize an object by running normalizers and validators that are mapped to a schema.","version":"0.2.1","homepage":"https://github.com/jonschlinkert/map-schema","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/map-schema.git"},"bugs":{"url":"https://github.com/jonschlinkert/map-schema/issues"},"license":"MIT","files":["index.js","lib/"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"arr-union":"^3.0.0","collection-visit":"^0.2.1","component-emitter":"^1.2.0","debug":"^2.2.0","get-value":"^2.0.2","is-primitive":"^2.0.0","kind-of":"^3.0.2","lazy-cache":"^1.0.3","log-utils":"^0.1.0","longest":"^1.0.1","mixin-deep":"^1.1.3","object.omit":"^2.0.0","object.pick":"^1.1.2","omit-empty":"^0.3.2","pad-right":"^0.2.2","set-value":"^0.3.2","sort-object-arrays":"^0.1.1","union-value":"^0.2.1"},"devDependencies":{"gulp":"^3.9.0","gulp-eslint":"^1.1.1","gulp-format-md":"^0.1.4","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","isobject":"^2.0.0","mocha":"*"},"keywords":["map","schema"],"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"highlight":"normalize-pkg","list":["get-value","set-value","object.omit","object.pick","normalize-pkg"]},"reflinks":["normalize-pkg","isobject","verb"],"lint":{"reflinks":true}},"gitHead":"70e7328e63e1c4632e8ebf3215503a036b5ccaa1","_id":"map-schema@0.2.1","_shasum":"1cf349eb8dc8205b95a8d798c3954d5243b5f10c","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"1cf349eb8dc8205b95a8d798c3954d5243b5f10c","size":8901,"noattachment":false,"key":"/map-schema/-/map-schema-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/map-schema/download/map-schema-0.2.1.tgz"},"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/map-schema-0.2.1.tgz_1458756372981_0.4403641482349485"},"directories":{},"publish_time":1458756375165,"_cnpm_publish_time":1458756375165,"_hasShrinkwrap":false},"0.2.0":{"name":"map-schema","description":"Normalize an object by running normalizers and validators that are mapped to a schema.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/map-schema","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/map-schema.git"},"bugs":{"url":"https://github.com/jonschlinkert/map-schema/issues"},"license":"MIT","files":["index.js","lib/"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"arr-union":"^3.0.0","collection-visit":"^0.2.1","component-emitter":"^1.2.0","debug":"^2.2.0","get-value":"^2.0.2","kind-of":"^3.0.2","lazy-cache":"^1.0.3","log-utils":"^0.1.0","longest":"^1.0.1","mixin-deep":"^1.1.3","object.omit":"^2.0.0","omit-empty":"^0.3.2","pad-right":"^0.2.2","set-value":"^0.3.2","sort-object-arrays":"^0.1.1","union-value":"^0.2.1"},"devDependencies":{"gulp":"^3.9.0","gulp-eslint":"^1.1.1","gulp-format-md":"^0.1.4","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","isobject":"^2.0.0","mocha":"*"},"keywords":["map","schema"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["normalize-pkg"]},"reflinks":["normalize-pkg","isobject"]},"gitHead":"8a99ad74ca313eefa43745ce65f8ebfcbad3fc92","_id":"map-schema@0.2.0","_shasum":"7e5ace5e40dc182056ae4f1d2e70b396925a1d99","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"7e5ace5e40dc182056ae4f1d2e70b396925a1d99","size":8343,"noattachment":false,"key":"/map-schema/-/map-schema-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/map-schema/download/map-schema-0.2.0.tgz"},"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/map-schema-0.2.0.tgz_1458394702745_0.016813125228509307"},"directories":{},"publish_time":1458394705260,"_cnpm_publish_time":1458394705260,"_hasShrinkwrap":false},"0.1.4":{"name":"map-schema","description":"Normalize an object by running normalizers and validators that are mapped to a schema.","version":"0.1.4","homepage":"https://github.com/jonschlinkert/map-schema","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/map-schema.git"},"bugs":{"url":"https://github.com/jonschlinkert/map-schema/issues"},"license":"MIT","files":["index.js","lib/"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"arr-union":"^3.0.0","collection-visit":"^0.2.1","component-emitter":"^1.2.0","debug":"^2.2.0","get-value":"^2.0.2","kind-of":"^3.0.2","lazy-cache":"^1.0.3","mixin-deep":"^1.1.3","omit-empty":"^0.3.2","set-value":"^0.3.2","sort-object-arrays":"^0.1.1","union-value":"^0.2.1"},"devDependencies":{"gulp":"^3.9.0","gulp-eslint":"^1.1.1","gulp-format-md":"^0.1.4","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","isobject":"^2.0.0","mocha":"*"},"keywords":["map","schema"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["normalize-pkg"]},"reflinks":["normalize-pkg","isobject"]},"gitHead":"c5e39fa5f226ebab597fd25a1739814698138b20","_id":"map-schema@0.1.4","_shasum":"2171c0f2911ca527b24037bdb5638c89c59562c8","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"2171c0f2911ca527b24037bdb5638c89c59562c8","size":7724,"noattachment":false,"key":"/map-schema/-/map-schema-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/map-schema/download/map-schema-0.1.4.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/map-schema-0.1.4.tgz_1457208439445_0.0577766306232661"},"directories":{},"publish_time":1457208442767,"_cnpm_publish_time":1457208442767,"_hasShrinkwrap":false},"0.1.3":{"name":"map-schema","description":"Normalize an object by running normalizers and validators that are mapped to a schema.","version":"0.1.3","homepage":"https://github.com/jonschlinkert/map-schema","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/map-schema.git"},"bugs":{"url":"https://github.com/jonschlinkert/map-schema/issues"},"license":"MIT","files":["index.js","lib/"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"arr-union":"^3.0.0","collection-visit":"^0.2.1","component-emitter":"^1.2.0","get-value":"^2.0.2","kind-of":"^3.0.2","lazy-cache":"^1.0.3","mixin-deep":"^1.1.3","omit-empty":"^0.3.2","set-value":"^0.3.2","sort-object-arrays":"^0.1.1","union-value":"^0.2.1"},"devDependencies":{"gulp":"^3.9.0","gulp-eslint":"^1.1.1","gulp-format-md":"^0.1.4","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","isobject":"^2.0.0","mocha":"*"},"keywords":["map","schema"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["normalize-pkg"]},"reflinks":["normalize-pkg","isobject"]},"gitHead":"11d4210b4bbfc25323bb0b3c099b4b93c2244ba3","_id":"map-schema@0.1.3","_shasum":"2a88d9d84b89261880a4e3ce33b68ecad8ba10a7","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"2a88d9d84b89261880a4e3ce33b68ecad8ba10a7","size":7665,"noattachment":false,"key":"/map-schema/-/map-schema-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/map-schema/download/map-schema-0.1.3.tgz"},"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/map-schema-0.1.3.tgz_1455743241347_0.7488306739833206"},"directories":{},"publish_time":1455743245606,"_cnpm_publish_time":1455743245606,"_hasShrinkwrap":false},"0.1.1":{"name":"map-schema","description":"Normalize an object by running normalizers and validators that are mapped to a schema.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/map-schema","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/map-schema.git"},"bugs":{"url":"https://github.com/jonschlinkert/map-schema/issues"},"license":"MIT","files":["index.js","lib/"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"arr-union":"^3.0.0","collection-visit":"^0.2.1","get-value":"^2.0.2","kind-of":"^3.0.2","lazy-cache":"^1.0.3","mixin-deep":"^1.1.3","omit-empty":"^0.3.2","set-value":"^0.3.2","sort-object-arrays":"^0.1.1","union-value":"^0.2.1"},"devDependencies":{"gulp":"^3.9.0","gulp-eslint":"^1.1.1","gulp-format-md":"^0.1.4","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","isobject":"^2.0.0","mocha":"*","stringify-author":"^0.1.3","try-open":"^0.1.0"},"keywords":["map","schema"],"verb":{"related":{"list":["normalize-pkg"]},"plugins":["gulp-format-md"],"layout":"default","reflinks":["normalize-pkg","isobject"]},"gitHead":"a0e6f452a9515a7dede202499c9e0a64bb1c57d9","_id":"map-schema@0.1.1","_shasum":"14f22d37de1addf4e7797c0effffd0905a5632be","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"14f22d37de1addf4e7797c0effffd0905a5632be","size":7859,"noattachment":false,"key":"/map-schema/-/map-schema-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/map-schema/download/map-schema-0.1.1.tgz"},"directories":{},"publish_time":1453071253679,"_cnpm_publish_time":1453071253679,"_hasShrinkwrap":false},"0.1.0":{"name":"map-schema","description":"Normalize an object by running normalizers and validators that are mapped to a schema.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/map-schema","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/map-schema.git"},"bugs":{"url":"https://github.com/jonschlinkert/map-schema/issues"},"license":"MIT","files":["index.js"],"main":"foo.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"arr-union":"^3.0.0","collection-visit":"^0.2.1","get-value":"^2.0.2","kind-of":"^3.0.2","lazy-cache":"^1.0.3","mixin-deep":"^1.1.3","omit-empty":"^0.3.2","set-value":"^0.3.2","sort-object-arrays":"^0.1.1","union-value":"^0.2.1"},"devDependencies":{"gulp":"^3.9.0","gulp-eslint":"^1.1.1","gulp-format-md":"^0.1.4","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","isobject":"^2.0.0","mocha":"*","stringify-author":"^0.1.3","try-open":"^0.1.0"},"keywords":["map","schema"],"verb":{"related":{"list":["normalize-pkg"]},"plugins":["gulp-format-md"]},"gitHead":"39fc70f2ff7bf6c455f130e37729ca13ba158392","_id":"map-schema@0.1.0","_shasum":"0bec9fc35962a816a70fdc85b39c7e795a265cb3","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"0bec9fc35962a816a70fdc85b39c7e795a265cb3","size":6595,"noattachment":false,"key":"/map-schema/-/map-schema-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/map-schema/download/map-schema-0.1.0.tgz"},"directories":{},"publish_time":1453070998607,"_cnpm_publish_time":1453070998607,"_hasShrinkwrap":false}},"readme":"# map-schema [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/map-schema.svg?style=flat)](https://www.npmjs.com/package/map-schema) [![NPM monthly downloads](https://img.shields.io/npm/dm/map-schema.svg?style=flat)](https://npmjs.org/package/map-schema) [![NPM total downloads](https://img.shields.io/npm/dt/map-schema.svg?style=flat)](https://npmjs.org/package/map-schema) [![Build Status](https://travis-ci.org/jonschlinkert/map-schema.svg?branch=master)](https://travis-ci.org/jonschlinkert/map-schema)\n\n> Normalize an object by running normalizers and validators that are mapped to a schema.\n\nYou might also be interested in [normalize-pkg](https://github.com/jonschlinkert/normalize-pkg).\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Table of Contents\n\n<details>\n<summary><strong>Details</strong></summary>\n\n- [Install](#install)\n- [Usage](#usage)\n- [API](#api)\n- [About](#about)\n\n</details>\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/) (requires [Node.js](https://nodejs.org/en/) >=10):\n\n```sh\n$ npm install --save map-schema\n```\n\n## Usage\n\n```js\nvar schema = require('map-schema');\n```\n\n**Example**\n\nThis is a basic example schema for normalizing and validating fields on `package.json` (a full version of this will be available on [normalize-pkg](https://github.com/jonschlinkert/normalize-pkg) when complete):\n\n```js\nvar fs = require('fs');\nvar isObject = require('isobject');\nvar Schema = require('map-schema');\n\n// create a schema\nvar schema = new Schema()\n  .field('name', 'string')\n  .field('description', 'string')\n  .field('repository', ['object', 'string'], {\n    normalize: function(val) {\n      return isObject(val) ? val.url : val;\n    }\n  })\n  .field('main', 'string', {\n    validate: function(filepath) {\n      return fs.existsSync(filepath);\n    }\n  })\n  .field('version', 'string', {\n    default: '0.1.0'\n  })\n  .field('license', 'string', {\n    default: 'MIT'\n  })\n\nvar pkg = require('./package');\n// normalize an object\nconsole.log(schema.normalize(pkg));\n// validation errors array\nconsole.log(schema.errors);\n```\n\n**Errors**\n\nValidation errors are exposed on `schema.errors`. Error reporting is pretty basic right now but I plan to implement something better soon.\n\n## API\n\n**Params**\n\n* `options` **{Object}**\n\n**Example**\n\n```js\nvar schema = new Schema()\n  .field('name', 'string')\n  .field('version', 'string')\n  .field('license', 'string')\n  .field('licenses', 'array', {\n    normalize: function(val, key, config) {\n       // convert license array to `license` string\n       config.license = val[0].type;\n       delete config[key];\n    }\n  })\n  .normalize(require('./package'))\n```\n\nSet `key` on the instance with the given `value`.\n\n**Params**\n\n* `key` **{String}**\n* `value` **{Object}**\n\nPush a warning onto the `schema.warnings` array. Placeholder for\nbetter message handling and a reporter (planned).\n\n**Params**\n\n* `method` **{String}**: The name of the method where the warning is recorded.\n* `prop` **{String}**: The name of the field for which the warning is being created.\n* `message` **{String}**: The warning message.\n* `value` **{String}**: The value associated with the warning.\n* `returns` **{any}**\n\n**Params**\n\n* `name` **{String}**\n* `type` **{String|Array}**\n* `options` **{Object}**\n* `returns` **{Object}**: Returns the instance for chaining.\n\n**Example**\n\n```js\nvar semver = require('semver');\n\nschema\n  .field('keywords', 'array')\n  .field('version', 'string', {\n    validate: function(val, key, config, schema) {\n      return semver.valid(val) !== null;\n    }\n  })\n```\n\n**Params**\n\n* `name` **{Strign}**\n* `prop` **{String}**\n* `returns` **{Object|any}**: Returns the field instance or the value of `prop` if specified.\n\n**Example**\n\n```js\nschema.field('bugs', ['object', 'string']);\nvar field = schema.get('bugs', 'types');\n//=> ['object', 'string']\n```\n\nOmit a property from the returned object. This method can be used\nin normalize functions as a way of removing undesired properties.\n\n**Params**\n\n* `key` **{String}**: The property to remove\n* `returns` **{Object}**: Returns the instance for chaining.\n\nUpdate a property on the returned object. This method will trigger validation\nand normalization of the updated property.\n\n**Params**\n\n* `key` **{String}**: The property to update.\n* `val` **{any}**: Value of the property to update.\n* `returns` **{Object}**: Returns the instance for chaining.\n\nReturns true if field `name` is an optional field.\n\n**Params**\n\n* `name` **{String}**\n* `returns` **{Boolean}**\n\nReturns true if field `name` was defined as a required field.\n\n**Params**\n\n* `name` **{String}**\n* `returns` **{Boolean}**\n\nChecks the config object for missing fields and. If found,\na warning message is pushed onto the `schema.warnings` array,\nwhich can be used for reporting.\n\n**Params**\n\n* `config` **{Object}**\n* `returns` **{Array}**\n\n**Params**\n\n* `config` **{Object}**\n* `returns` **{Object}**: Returns the config object with keys sorted to match the given array of keys.\n\n**Example**\n\n```js\nschema.sortObject({z: '', a: ''}, ['a', 'z']);\n//=> {a: '', z: ''}\n```\n\nWhen `options.sortArrays` _is not false_, sorts all arrays in the\ngiven `config` object using JavaScript's native `.localeCompare`\nmethod.\n\n**Params**\n\n* `config` **{Object}**\n* `returns` **{Object}**: returns the config object with sorted arrays\n\nReturns true if the given value is valid for field `key`.\n\n**Params**\n\n* `key` **{String}**\n* `val` **{any}**\n* `config` **{Object}**\n* `returns` **{Boolean}**\n\nNormalize the given `config` object.\n\n**Params**\n\n* **{String}**: key\n* **{any}**: value\n* **{Object}**: config\n* `returns` **{Object}**\n\nNormalize a field on the schema.\n\n**Params**\n\n* **{String}**: key\n* **{any}**: value\n* **{Object}**: config\n* `returns` **{Object}**\n\nVisit `method` over the given object or array.\n\n**Params**\n\n* `method` **{String}**\n* `value` **{Object|Array}**\n* `returns` **{Object}**: Returns the instance for chaining.\n\n### [Field](lib/field.js#L22)\n\nCreate a new `Field` of the given `type` to validate against, and optional `config` object.\n\n**Params**\n\n* `type` **{String|Array}**: One more JavaScript native types to use for validation.\n* `config` **{Object}**\n\n**Example**\n\n```js\nconst field = new Field('string', {\n  normalize: function(val) {\n    // do stuff to `val`\n    return val;\n  }\n});\n```\n\n### [.isValidType](lib/field.js#L67)\n\nReturns true if the given `type` is a valid type.\n\n**Params**\n\n* `type` **{String}**\n* `returns` **{Boolean}**\n\n### [.validate](lib/field.js#L89)\n\nCalled in `schema.validate`, returns true if the given `value` is valid. This default validate method returns true unless overridden with a custom `validate` method.\n\n* `returns` **{Boolean}**\n\n**Example**\n\n```js\nvar field = new Field({\n  types: ['string']\n});\n\nfield.validate('name', {});\n//=> false\n```\n\n### [.normalize](lib/field.js#L108)\n\nNormalize the field's value.\n\n**Example**\n\n```js\nvar field = new Field({\n  types: ['string'],\n  normalize: function(val, key, config, schema) {\n    // do stuff to `val`\n    return val;\n  }\n});\n```\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [get-value](https://www.npmjs.com/package/get-value): Use property paths like 'a.b.c' to get a nested value from an object. Even works… [more](https://github.com/jonschlinkert/get-value) | [homepage](https://github.com/jonschlinkert/get-value \"Use property paths like 'a.b.c' to get a nested value from an object. Even works when keys have dots in them (no other dot-prop library can do this!).\")\n* [normalize-pkg](https://www.npmjs.com/package/normalize-pkg): Normalize values in package.json using the map-schema library. | [homepage](https://github.com/jonschlinkert/normalize-pkg \"Normalize values in package.json using the map-schema library.\")\n* [object.omit](https://www.npmjs.com/package/object.omit): Return a copy of an object excluding the given key, or array of keys. Also… [more](https://github.com/jonschlinkert/object.omit) | [homepage](https://github.com/jonschlinkert/object.omit \"Return a copy of an object excluding the given key, or array of keys. Also accepts an optional filter function as the last argument.\")\n* [object.pick](https://www.npmjs.com/package/object.pick): Returns a filtered copy of an object with only the specified keys, similar to `_.pick… [more](https://github.com/jonschlinkert/object.pick) | [homepage](https://github.com/jonschlinkert/object.pick \"Returns a filtered copy of an object with only the specified keys, similar to`_.pick` from lodash / underscore.\")\n* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value \"Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.\")\n\n### Author\n\n**Jon Schlinkert**\n\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2020, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 01, 2020._","_attachments":{},"homepage":"https://github.com/jonschlinkert/map-schema","bugs":{"url":"https://github.com/jonschlinkert/map-schema/issues"},"license":"MIT"}