{"_id":"@edcarroll/normalizr-decorators","_rev":"5-c98e54cbf707467abcedf67195c16a37","name":"@edcarroll/normalizr-decorators","description":"Schema decorators for normalizr","dist-tags":{"latest":"1.0.0-alpha.5"},"versions":{"1.0.0-alpha.1":{"name":"@edcarroll/normalizr-decorators","version":"1.0.0-alpha.1","description":"Schema decorators for normalizr","author":{"name":"Michael Wolbert","email":"michael.wolbert@gmail.com"},"bugs":{"url":"https://github.com/mchlbrnd/normalizr-decorators/issues"},"homepage":"https://github.com/mchlbrnd/normalizr-decorators","repository":{"url":"git+https://github.com/mchlbrnd/normalizr-decorators.git","type":"git"},"license":"MIT","keywords":["decorator","reflect","flux","redux","normalize","denormalize","api","json"],"files":["dist/","LICENSE","README.md"],"main":"dist/index.js","typings":"dist/index.d.ts","engineStrict":true,"engines":{"node":">= 6.9.0"},"scripts":{"clean":"rimraf coverage build tmp","build":"tsc -p tsconfig.release.json","watch":"tsc -w -p tsconfig.release.json","lint":"tslint -t stylish '{src}/**/*.{ts,tsx}'","test":"tsc && npm run test-only","test-only":"jest --coverage","test:watch":"jest --watch"},"jest":{"testEnvironment":"node","transform":{".(ts|tsx)":"<rootDir>/preprocessor.js"},"moduleFileExtensions":["ts","tsx","js","jsx"],"testRegex":"<rootDir>(src/tests/).*\\.(test|spec)\\.(ts|js)$","coverageDirectory":"coverage","collectCoverageFrom":["src/**/*.{ts,tsx,js,jsx}","!src/**/*.d.ts","!src/tests/**/*.*"]},"devDependencies":{"@types/jest":"~19.2.2","@types/node":"~6.0.70","jest":"~19.0.2","normalizr":"^3.2.2","rimraf":"~2.6.1","tslint":"~4.5.1","tslint-microsoft-contrib":"~4.0.0","typescript":"~2.3.4"},"dependencies":{"reflect-metadata":"^0.1.10","tslib":"~1.6.0"},"peerDependencies":{"normalizr":"^3.2.2"},"gitHead":"18df80185635b58d9d0e0de58ff65b6f3af46012","_id":"@edcarroll/normalizr-decorators@1.0.0-alpha.1","_npmVersion":"5.0.4","_nodeVersion":"8.1.3","_npmUser":{"name":"edcarroll","email":"ed@edcarroll.co.uk"},"dist":{"integrity":"sha512-+0DLafoaFoeBXhTlSdrfCP8t7GFxDVnj+UBVPfXv87v3m0CXufODTRT/t9jO8DBW8kyZ/pTumGdiP0/HzaE84w==","shasum":"3ca4b98dc074cf098d722e35b1ab517c292b2ba0","tarball":"https://registry.npmjs.org/@edcarroll/normalizr-decorators/-/normalizr-decorators-1.0.0-alpha.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwEvuklaUXztesrviGd7SO9lQXnEUPTU8PNR92JCUXIgIhAMmYASVHt0kZ74jjZy1v95dkjWtUHI1DYdg7x2AoHZLY"}]},"maintainers":[{"name":"edcarroll","email":"ed@edcarroll.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/normalizr-decorators-1.0.0-alpha.1.tgz_1500271368077_0.5415697663556784"}},"1.0.0-alpha.2":{"name":"@edcarroll/normalizr-decorators","version":"1.0.0-alpha.2","description":"Schema decorators for normalizr","author":{"name":"Michael Wolbert","email":"michael.wolbert@gmail.com"},"bugs":{"url":"https://github.com/mchlbrnd/normalizr-decorators/issues"},"homepage":"https://github.com/mchlbrnd/normalizr-decorators","repository":{"url":"git+https://github.com/mchlbrnd/normalizr-decorators.git","type":"git"},"license":"MIT","keywords":["decorator","reflect","flux","redux","normalize","denormalize","api","json"],"files":["dist/","LICENSE","README.md"],"main":"dist/index.js","types":"dist/index.d.ts","engineStrict":true,"engines":{"node":">= 6.9.0"},"scripts":{"clean":"rimraf coverage build tmp","build":"tsc -p tsconfig.release.json","watch":"tsc -w -p tsconfig.release.json","lint":"tslint -t stylish '{src}/**/*.{ts,tsx}'","test":"tsc && npm run test-only","test-only":"jest --coverage","test:watch":"jest --watch"},"jest":{"testEnvironment":"node","transform":{".(ts|tsx)":"<rootDir>/preprocessor.js"},"moduleFileExtensions":["ts","tsx","js","jsx"],"testRegex":"<rootDir>(src/tests/).*\\.(test|spec)\\.(ts|js)$","coverageDirectory":"coverage","collectCoverageFrom":["src/**/*.{ts,tsx,js,jsx}","!src/**/*.d.ts","!src/tests/**/*.*"]},"devDependencies":{"@types/jest":"~19.2.2","@types/node":"~6.0.70","jest":"~19.0.2","normalizr":"^3.2.2","rimraf":"~2.6.1","tslint":"~4.5.1","tslint-microsoft-contrib":"~4.0.0","typescript":"~2.3.4"},"dependencies":{"reflect-metadata":"^0.1.10","tslib":"~1.6.0"},"peerDependencies":{"normalizr":"^3.2.2"},"gitHead":"18df80185635b58d9d0e0de58ff65b6f3af46012","_id":"@edcarroll/normalizr-decorators@1.0.0-alpha.2","_npmVersion":"5.0.4","_nodeVersion":"8.1.3","_npmUser":{"name":"edcarroll","email":"ed@edcarroll.co.uk"},"dist":{"integrity":"sha512-IySB17Exs2TNFUmeCaFhDmChS2EaeeYlzTuzv4pycAqjK6EUa+Vs00xFZAg3Io20dAt7bBwHsNkWXhyEvl//Wg==","shasum":"d0996ab51aa14bf78051f16bf9ed9c67881ae054","tarball":"https://registry.npmjs.org/@edcarroll/normalizr-decorators/-/normalizr-decorators-1.0.0-alpha.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCYhTVpDpEkz0VBPUU3DqNdyXISEGNItzsuTsR9mkZmAIhANVrjYJ0PYPL8H+tiO2dpH2TUzItpfNgaMomLyE/MNkD"}]},"maintainers":[{"name":"edcarroll","email":"ed@edcarroll.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/normalizr-decorators-1.0.0-alpha.2.tgz_1501041325894_0.28218751586973667"}},"1.0.0-alpha.3":{"name":"@edcarroll/normalizr-decorators","version":"1.0.0-alpha.3","description":"Schema decorators for normalizr","author":{"name":"Michael Wolbert","email":"michael.wolbert@gmail.com"},"bugs":{"url":"https://github.com/mchlbrnd/normalizr-decorators/issues"},"homepage":"https://github.com/mchlbrnd/normalizr-decorators","repository":{"url":"git+https://github.com/mchlbrnd/normalizr-decorators.git","type":"git"},"license":"MIT","keywords":["decorator","reflect","flux","redux","normalize","denormalize","api","json"],"files":["dist/","LICENSE","README.md"],"main":"dist/index.js","types":"dist/index.d.ts","engineStrict":true,"engines":{"node":">= 6.9.0"},"scripts":{"clean":"rimraf coverage build tmp","build":"tsc -p tsconfig.release.json","watch":"tsc -w -p tsconfig.release.json","lint":"tslint -t stylish '{src}/**/*.{ts,tsx}'","test":"tsc && npm run test-only","test-only":"jest --coverage","test:watch":"jest --watch"},"jest":{"testEnvironment":"node","transform":{".(ts|tsx)":"<rootDir>/preprocessor.js"},"moduleFileExtensions":["ts","tsx","js","jsx"],"testRegex":"<rootDir>(src/tests/).*\\.(test|spec)\\.(ts|js)$","coverageDirectory":"coverage","collectCoverageFrom":["src/**/*.{ts,tsx,js,jsx}","!src/**/*.d.ts","!src/tests/**/*.*"]},"devDependencies":{"@types/jest":"~19.2.2","@types/node":"~6.0.70","jest":"~19.0.2","normalizr":"^3.2.2","rimraf":"~2.6.1","tslint":"~4.5.1","tslint-microsoft-contrib":"~4.0.0","typescript":"~2.3.4"},"dependencies":{"reflect-metadata":"^0.1.10","tslib":"~1.6.0"},"peerDependencies":{"normalizr":"^3.2.2"},"gitHead":"a23473f8b62ff9febcdd310a2a5f59c0a141f864","_id":"@edcarroll/normalizr-decorators@1.0.0-alpha.3","_npmVersion":"5.0.4","_nodeVersion":"8.1.3","_npmUser":{"name":"edcarroll","email":"ed@edcarroll.co.uk"},"dist":{"integrity":"sha512-XCTakPOIAtsK1MW3sawdWX9wTKLqGJrCjkwjqRx1T/jsWAay7HRQp0HBsF82tBWOL7rEytdqLO1o5lHDhBrLGg==","shasum":"d9ce614f10fe4419d734da0751931aba0f3400ea","tarball":"https://registry.npmjs.org/@edcarroll/normalizr-decorators/-/normalizr-decorators-1.0.0-alpha.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKarKk1JpJ0r4jNqOmcGc6HN0uKPv3Rsb3tdZxknzbjAIhAPVETcCW/fyweRMcE3nYZs0uCDgm7pW9OGmk/704i2JV"}]},"maintainers":[{"name":"edcarroll","email":"ed@edcarroll.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/normalizr-decorators-1.0.0-alpha.3.tgz_1501042258676_0.6892137443646789"}},"1.0.0-alpha.4":{"name":"@edcarroll/normalizr-decorators","version":"1.0.0-alpha.4","description":"Schema decorators for normalizr","author":{"name":"Michael Wolbert","email":"michael.wolbert@gmail.com"},"bugs":{"url":"https://github.com/mchlbrnd/normalizr-decorators/issues"},"homepage":"https://github.com/mchlbrnd/normalizr-decorators","repository":{"url":"git+https://github.com/mchlbrnd/normalizr-decorators.git","type":"git"},"license":"MIT","keywords":["decorator","reflect","flux","redux","normalize","denormalize","api","json"],"files":["dist/","LICENSE","README.md"],"main":"dist/index.js","types":"dist/index.d.ts","engineStrict":true,"engines":{"node":">= 6.9.0"},"scripts":{"clean":"rimraf coverage build tmp","build":"tsc -p tsconfig.release.json","watch":"tsc -w -p tsconfig.release.json","lint":"tslint -t stylish '{src}/**/*.{ts,tsx}'","test":"tsc && npm run test-only","test-only":"jest --coverage","test:watch":"jest --watch"},"jest":{"testEnvironment":"node","transform":{".(ts|tsx)":"<rootDir>/preprocessor.js"},"moduleFileExtensions":["ts","tsx","js","jsx"],"testRegex":"<rootDir>(src/tests/).*\\.(test|spec)\\.(ts|js)$","coverageDirectory":"coverage","collectCoverageFrom":["src/**/*.{ts,tsx,js,jsx}","!src/**/*.d.ts","!src/tests/**/*.*"]},"devDependencies":{"@types/jest":"~19.2.2","@types/node":"~6.0.70","jest":"~19.0.2","normalizr":"^3.2.2","rimraf":"~2.6.1","tslint":"~4.5.1","tslint-microsoft-contrib":"~4.0.0","typescript":"~2.3.4"},"dependencies":{"reflect-metadata":"^0.1.10","tslib":"~1.6.0"},"peerDependencies":{"normalizr":"^3.2.2"},"gitHead":"e82f28bfc700f03c222b241e3b3c6517c03293a8","_id":"@edcarroll/normalizr-decorators@1.0.0-alpha.4","_npmVersion":"5.3.0","_nodeVersion":"8.1.3","_npmUser":{"name":"edcarroll","email":"ed@edcarroll.co.uk"},"dist":{"integrity":"sha512-7kIUTGpwyIcuJ5vxnQTYyWtif4HY/p1IPVyoxGz0IP6646TUtYwVDrQYjWe/mUgwC7/nbcTHerY+lhDDor/HbA==","shasum":"b65dcdae764c500d89914b78d67a13d796ab64f4","tarball":"https://registry.npmjs.org/@edcarroll/normalizr-decorators/-/normalizr-decorators-1.0.0-alpha.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEOL5GKWwQ7t0yzDWcJ74r+7a3Kb3Li84hSu8U9TUgScAiEAy4NY+N+x5jVKBBTN8OgeBxrEMp/AfSep5z2DVcHLvY4="}]},"maintainers":[{"name":"edcarroll","email":"ed@edcarroll.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/normalizr-decorators-1.0.0-alpha.4.tgz_1501571506471_0.5940616391599178"}},"1.0.0-alpha.5":{"name":"@edcarroll/normalizr-decorators","version":"1.0.0-alpha.5","description":"Schema decorators for normalizr","author":{"name":"Michael Wolbert","email":"michael.wolbert@gmail.com"},"bugs":{"url":"https://github.com/mchlbrnd/normalizr-decorators/issues"},"homepage":"https://github.com/mchlbrnd/normalizr-decorators","repository":{"url":"git+https://github.com/mchlbrnd/normalizr-decorators.git","type":"git"},"license":"MIT","keywords":["decorator","reflect","flux","redux","normalize","denormalize","api","json"],"files":["dist/","LICENSE","README.md"],"main":"dist/index.js","types":"dist/index.d.ts","engineStrict":true,"engines":{"node":">= 6.9.0"},"scripts":{"clean":"rimraf coverage build tmp","build":"tsc -p tsconfig.release.json","watch":"tsc -w -p tsconfig.release.json","lint":"tslint -t stylish '{src}/**/*.{ts,tsx}'","test":"tsc && npm run test-only","test-only":"jest --coverage","test:watch":"jest --watch"},"jest":{"testEnvironment":"node","transform":{".(ts|tsx)":"<rootDir>/preprocessor.js"},"moduleFileExtensions":["ts","tsx","js","jsx"],"testRegex":"<rootDir>(src/tests/).*\\.(test|spec)\\.(ts|js)$","coverageDirectory":"coverage","collectCoverageFrom":["src/**/*.{ts,tsx,js,jsx}","!src/**/*.d.ts","!src/tests/**/*.*"]},"devDependencies":{"@types/jest":"~19.2.2","@types/node":"~6.0.70","jest":"~19.0.2","normalizr":"^3.2.2","rimraf":"~2.6.1","tslint":"~4.5.1","tslint-microsoft-contrib":"~4.0.0","typescript":"~2.3.4"},"dependencies":{"reflect-metadata":"^0.1.10","tslib":"~1.6.0"},"peerDependencies":{"normalizr":"^3.2.2"},"gitHead":"529d768bad0c4831463d509b1fd6cbd9106d8473","_id":"@edcarroll/normalizr-decorators@1.0.0-alpha.5","_npmVersion":"5.3.0","_nodeVersion":"8.1.3","_npmUser":{"name":"edcarroll","email":"ed@edcarroll.co.uk"},"dist":{"integrity":"sha512-LsyUuRutc+rjHogsUGt9WVbOhI3OECbVCQ14R38v+pHonF4XQh9lJzLHWh8o3fkkVw2J34NExzU2HK0xARuI2Q==","shasum":"42f0c576b0ff1a7c029bb4047a386024eae86efa","tarball":"https://registry.npmjs.org/@edcarroll/normalizr-decorators/-/normalizr-decorators-1.0.0-alpha.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDi3XrU+XK7A5VpjD1OKH2kHrD3EFgIah1EzWwcERPvbAIgPL+FIao4lnv9w+eWCRs4l1VzzWjGuRJq2jBhVGfGVD0="}]},"maintainers":[{"name":"edcarroll","email":"ed@edcarroll.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/normalizr-decorators-1.0.0-alpha.5.tgz_1501857888152_0.8074027365073562"}}},"readme":"# normalizr-decorators (highly experimental)\r\nTypeScript normalizr decorators for normalization of class and property definitions\r\n\r\n## Which normalizr Schema types can be used as decorators?\r\n* Class\r\n  * Entity via @Entity({key: string, options?: EntityOptions})\r\n* Property\r\n  * Entity via @EntityProperty()\r\n  * Array via @ArrayProperty(element)\r\n\r\n## Example decorating, normalizing and denormalizing\r\n```javascript\r\nimport { ArrayProperty, Entity, EntityProperty, normalize, denormalize } from './index';\r\n\r\n@Entity({key: 'users'})\r\nclass User {\r\n  readonly id: number;\r\n}\r\n\r\n@Entity({key: 'comments'})\r\nclass Comment {\r\n  readonly id: number;\r\n\r\n  @EntityProperty()\r\n  commenter: User;\r\n}\r\n\r\n@Entity({key: 'articles'})\r\nclass Article {\r\n  readonly id: number;\r\n\r\n  @EntityProperty()\r\n  author: User;\r\n\r\n  @ArrayProperty(Comment)\r\n  comments: Comment[];\r\n}\r\n\r\nconst originalData = {\r\n  id: 123,\r\n  author: {\r\n    id: 1,\r\n    name: 'Paul'\r\n  },\r\n  title: 'My awesome blog post',\r\n  comments: [\r\n    {\r\n      id: 324,\r\n      commenter: {\r\n        id: 2,\r\n        name: 'Nicole'\r\n      }\r\n    }\r\n  ]\r\n};\r\n\r\n\r\nconst {entities, result}  = normalize(originalData, Article);\r\nconst denormalizedData = denormalize(result, Article, entities);\r\n```\r\n","maintainers":[{"name":"edcarroll","email":"ed@edcarroll.co.uk"}],"time":{"modified":"2022-04-05T06:40:51.821Z","created":"2017-07-17T06:02:49.000Z","1.0.0-alpha.1":"2017-07-17T06:02:49.000Z","1.0.0-alpha.2":"2017-07-26T03:55:26.924Z","1.0.0-alpha.3":"2017-07-26T04:10:59.854Z","1.0.0-alpha.4":"2017-08-01T07:11:47.366Z","1.0.0-alpha.5":"2017-08-04T14:44:49.139Z"},"homepage":"https://github.com/mchlbrnd/normalizr-decorators","keywords":["decorator","reflect","flux","redux","normalize","denormalize","api","json"],"repository":{"url":"git+https://github.com/mchlbrnd/normalizr-decorators.git","type":"git"},"author":{"name":"Michael Wolbert","email":"michael.wolbert@gmail.com"},"bugs":{"url":"https://github.com/mchlbrnd/normalizr-decorators/issues"},"license":"MIT","readmeFilename":"README.md"}