{"_id":"rosie","_rev":"35-247e3de3e6557f6f7144db8c43d5f470","name":"rosie","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","dist-tags":{"latest":"2.1.1"},"versions":{"0.1.0":{"name":"rosie","version":"0.1.0","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[],"dependencies":{},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","_npmUser":{"name":"bkeepers","email":"brandon@opensoul.org"},"_id":"rosie@0.1.0","devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"b0bc25205e0c8c12507708c4e6f02821049dfc7e","tarball":"https://registry.npmjs.org/rosie/-/rosie-0.1.0.tgz","integrity":"sha512-GyP+wFXlahnIeBOCJR/ccAPUg9jia0AXw58JuV1PxUalMCpwSTpLaDJG9p1IwiizhwFkzHepbW+OK03MwCOH7g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG8XfzWZj2XKG8xsZWMOwBwdnu0dhJabZGcfN8fqjSy6AiEA5NmhrY0JrbV+10AeHdD8WV47kMPGR+eDJ5gV8WWkV4w="}]},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"}],"directories":{}},"0.1.1":{"name":"rosie","version":"0.1.1","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[],"dependencies":{},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","_npmUser":{"name":"bkeepers","email":"brandon@opensoul.org"},"_id":"rosie@0.1.1","devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"055c62a35926f7ca95a0039687f72692f30666df","tarball":"https://registry.npmjs.org/rosie/-/rosie-0.1.1.tgz","integrity":"sha512-7c8xervBDXeNplWg+Ff69wwvmF6uVKustWpgHhCnSbTf67tYGA984J2GVwujhzKEXKwOXMdIhDJ1NgI5gJ6RBQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID/HZVCqSk3nX/8SpiVWKyNFZgFMBIn3CnYjLbxqnF/lAiEA/+7G646OBwp5OywBIDcdpv+9cpCTyoT6IILL1TbSXIc="}]},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"}],"directories":{}},"0.2.0":{"name":"rosie","version":"0.2.0","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[],"dependencies":{},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","_id":"rosie@0.2.0","dist":{"shasum":"978a6e0bd9d52869d32c769a3f1b445d9c67ca3b","tarball":"https://registry.npmjs.org/rosie/-/rosie-0.2.0.tgz","integrity":"sha512-1fJEz8KJuQssRlBh7uEV8VfOGzIoE51mIftIlhZ/eCpqlRympxdsEttmUhP94SjDgQ5QPriJ6AAtkqGhYHMt5g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC4iYl5ABCMRPYCrewVm3OHyxvqKCSLb6cfuUBuLWZfWAiEAmrZ41tYtMCwF2JfVADy78TYusg5O6mOyb1PrwzkxklM="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"bkeepers","email":"brandon@opensoul.org"},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"}],"directories":{}},"0.3.0":{"name":"rosie","version":"0.3.0","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[],"dependencies":{},"devDependencies":{"karma":"^0.12.1","karma-chrome-launcher":"^0.1.2","karma-jasmine":"^0.1.5","karma-phantomjs-launcher":"^0.1.2"},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","scripts":{"test":"./node_modules/karma/bin/karma start --singleRun true","watch":"./node_modules/karma/bin/karma start"},"bugs":{"url":"https://github.com/bkeepers/rosie/issues"},"homepage":"https://github.com/bkeepers/rosie","_id":"rosie@0.3.0","dist":{"shasum":"d1c83443676e1557bd1001820723d7b473b2bbdc","tarball":"https://registry.npmjs.org/rosie/-/rosie-0.3.0.tgz","integrity":"sha512-TatI8ZMC2HLCwp1ychY+iN7E0+rt45eNq0ZizLMc7fym6LtauJ22XUUamK6/elJoVTuviA9joRRdb4p96fYUXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjReyMbes26GjMTT+1npiG1ECiK5kph9AD+9loWuXu3gIhALFfx80JpUtD+GFzNVBvERCqWDaOWiL+rL28Dzxv/Anj"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"eventualbuddha","email":"me@brian-donovan.com"},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"me@brian-donovan.com"}],"directories":{}},"0.3.1":{"name":"rosie","version":"0.3.1","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[],"dependencies":{},"devDependencies":{"karma":"^0.12.1","karma-chrome-launcher":"^0.1.2","karma-jasmine":"^0.1.5","karma-phantomjs-launcher":"^0.1.2"},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","scripts":{"test":"./node_modules/karma/bin/karma start --singleRun true","watch":"./node_modules/karma/bin/karma start"},"bugs":{"url":"https://github.com/bkeepers/rosie/issues"},"homepage":"https://github.com/bkeepers/rosie","_id":"rosie@0.3.1","_shasum":"b0b846699ced9280195d0887a448a004116123ac","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"eventualbuddha","email":"me@brian-donovan.com"},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"me@brian-donovan.com"}],"dist":{"shasum":"b0b846699ced9280195d0887a448a004116123ac","tarball":"https://registry.npmjs.org/rosie/-/rosie-0.3.1.tgz","integrity":"sha512-CVgRPCPFzVO2YxK6EeDDcApvCkvO2EzMMQ+3xeJ+9IiK3UURCdCV80M/xw8VJMG5W+dPRWjImdK6Fxaju2tScA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAr1IuCzex5tD2LZxtkIvD3U1XKjfLmsxlOkbgdfOEnbAiAY4ua/rbqv2m7GoDnsHdOrtPFFIYlEKMFe5EykG7DFdw=="}]},"directories":{}},"0.4.0":{"name":"rosie","version":"0.4.0","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[],"dependencies":{},"devDependencies":{"karma":"^0.12.1","karma-chrome-launcher":"^0.1.2","karma-jasmine":"^0.1.5","karma-phantomjs-launcher":"^0.1.2"},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","scripts":{"test":"./node_modules/karma/bin/karma start --singleRun true","watch":"./node_modules/karma/bin/karma start"},"gitHead":"63aeabefb3a3fea1f4f075515492181c83312257","bugs":{"url":"https://github.com/bkeepers/rosie/issues"},"homepage":"https://github.com/bkeepers/rosie","_id":"rosie@0.4.0","_shasum":"34ea85c981bcf30c093933a28818a4db445266fb","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"eventualbuddha","email":"me@brian-donovan.com"},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"me@brian-donovan.com"}],"dist":{"shasum":"34ea85c981bcf30c093933a28818a4db445266fb","tarball":"https://registry.npmjs.org/rosie/-/rosie-0.4.0.tgz","integrity":"sha512-KqChiPAlmRpAld1LN+99DrahedLtHOH4zE/PlbHsvWpls2EnvNUNZmgb+wy80BjlZpXe6hiwaBn6rbDjihINSg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuCM32lgZmSedrVI38+8VzxYggKe/lqzVPhdukwPb00AIhALYTKYaZMNyAHw72MFGdMf262za+AZTJrsQPJHunCTOk"}]},"directories":{}},"0.4.1":{"name":"rosie","version":"0.4.1","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[],"dependencies":{},"devDependencies":{"karma":"^0.12.1","karma-chrome-launcher":"^0.1.2","karma-jasmine":"^0.1.5","karma-phantomjs-launcher":"^0.1.2"},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","scripts":{"test":"./node_modules/karma/bin/karma start --singleRun true","watch":"./node_modules/karma/bin/karma start"},"files":["src/rosie.js"],"gitHead":"c462e11508aca9a9aea9d9afe7a305ff4da12053","bugs":{"url":"https://github.com/bkeepers/rosie/issues"},"homepage":"https://github.com/bkeepers/rosie","_id":"rosie@0.4.1","_shasum":"c3f670a3d3ca370ddb744e253f586073992f1205","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.1","_npmUser":{"name":"eventualbuddha","email":"me@brian-donovan.com"},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"me@brian-donovan.com"}],"dist":{"shasum":"c3f670a3d3ca370ddb744e253f586073992f1205","tarball":"https://registry.npmjs.org/rosie/-/rosie-0.4.1.tgz","integrity":"sha512-nyDZCQ5QcFaLyiGXaRdIQn2AHF32o9G+WBmuaMrHHr0XLIybUI4J2mxZcwaElzF3rxbDznenPfagqucFQtZI8A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnj6RNgl9rZNaB6GTixP6trOCeBVeols+8Kvn9fjJuTgIgAo/ZBB8LP+QAx9A07siBdqPX6iCIjZxyhL7A/xLYpUc="}]},"directories":{}},"0.4.2":{"name":"rosie","version":"0.4.2","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[],"dependencies":{},"devDependencies":{"karma":"^0.12.1","karma-chrome-launcher":"^0.1.2","karma-jasmine":"^0.1.5","karma-phantomjs-launcher":"^0.1.2"},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","scripts":{"test":"./node_modules/karma/bin/karma start --singleRun true","watch":"./node_modules/karma/bin/karma start"},"files":["src/rosie.js"],"gitHead":"39d0c311fdf7fe3236e0603a148a94261a985d1b","bugs":{"url":"https://github.com/bkeepers/rosie/issues"},"homepage":"https://github.com/bkeepers/rosie","_id":"rosie@0.4.2","_shasum":"ff07b2cd2295ef297ba1a6cf7bd4584f3e85f114","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.1","_npmUser":{"name":"eventualbuddha","email":"me@brian-donovan.com"},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"me@brian-donovan.com"}],"dist":{"shasum":"ff07b2cd2295ef297ba1a6cf7bd4584f3e85f114","tarball":"https://registry.npmjs.org/rosie/-/rosie-0.4.2.tgz","integrity":"sha512-XvyI8ylLmsU6iDuyFyKzkNyLin4aLUX2VRTcUFUoBwFS+/85hmEtqg6Ip2sOv3Z4E5jF1ua6noHOmlUPtkEktw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEKyyfE4aN07GrRMBmLXl14/73sgZ7tNfCyEUx/6ESO1AiBnhSk5PwYT8J68zFc8jXK2kUNv02RA7ldykIJ8W3HmPw=="}]},"directories":{}},"1.0.0":{"name":"rosie","version":"1.0.0","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[],"dependencies":{},"devDependencies":{"karma":"^0.12.1","karma-chrome-launcher":"^0.1.2","karma-jasmine":"^0.1.5","karma-phantomjs-launcher":"^0.1.2"},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","scripts":{"test":"./node_modules/karma/bin/karma start --singleRun true","watch":"./node_modules/karma/bin/karma start"},"files":["src/rosie.js"],"gitHead":"2f7dd398e9d59a850b85c83deafac7d63ec1597e","bugs":{"url":"https://github.com/bkeepers/rosie/issues"},"homepage":"https://github.com/bkeepers/rosie#readme","_id":"rosie@1.0.0","_shasum":"09e5a35bd1d4f6dcf999f0dcd5ddc23189bfec63","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"eventualbuddha","email":"me@brian-donovan.com"},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"me@brian-donovan.com"}],"dist":{"shasum":"09e5a35bd1d4f6dcf999f0dcd5ddc23189bfec63","tarball":"https://registry.npmjs.org/rosie/-/rosie-1.0.0.tgz","integrity":"sha512-IepO0w8sKvB0US4emkLzMsuNohjSj+qLnx7GDjyONDgInbagWhTy1Iua9UpReLpb6wltw9CMCGpZL34egqeZhw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAAGy0kDZvmSMp6gAh607f7IbVddomvVn+P/PGq+0uwgIhALiScwfr2pG+9iBYYxZuyu6422YoyxPcReL19Be9pwG+"}]},"directories":{}},"1.1.0":{"name":"rosie","version":"1.1.0","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[{"name":"Brian Donovan","email":"me@brian-donovan.com"}],"dependencies":{},"devDependencies":{"karma":"^0.12.1","karma-chrome-launcher":"^0.1.2","karma-jasmine":"^0.1.5","karma-phantomjs-launcher":"^0.1.2"},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","scripts":{"test":"./node_modules/karma/bin/karma start --singleRun true","watch":"./node_modules/karma/bin/karma start"},"files":["src/rosie.js"],"gitHead":"ccc96cad72248828bb198b130ad9a111a7b60fb6","bugs":{"url":"https://github.com/bkeepers/rosie/issues"},"homepage":"https://github.com/bkeepers/rosie#readme","_id":"rosie@1.1.0","_shasum":"94fe9d85deab13b55f140045efb3f3ad3ce07d8f","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"eventualbuddha","email":"me@brian-donovan.com"},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"me@brian-donovan.com"}],"dist":{"shasum":"94fe9d85deab13b55f140045efb3f3ad3ce07d8f","tarball":"https://registry.npmjs.org/rosie/-/rosie-1.1.0.tgz","integrity":"sha512-6GGFWjMXQNp7wmH97gd4F8Iq5WL4cEIs6WGtUFRg+gN9bZVsW0j7r/YqxUyFuvQ2yD6zrt9/EUNTTgWmqJlCmQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAeSweMYcgveYuH8RA/tP7v4pt2WezRNY5h21PcUHXdBAiAUoVK9Ug6KaVn+Edv3ILxg2olkPkarqZn/e13k8DXapQ=="}]},"directories":{}},"1.2.0":{"name":"rosie","version":"1.2.0","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[{"name":"Brian Donovan","email":"me@brian-donovan.com"}],"dependencies":{},"devDependencies":{"eslint":"^1.4.1","karma":"^0.13.9","karma-chrome-launcher":"^0.2.0","karma-jasmine":"^0.3.6","karma-phantomjs-launcher":"^0.2.1"},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","scripts":{"pretest":"eslint src spec","test":"./node_modules/karma/bin/karma start --singleRun true","watch":"./node_modules/karma/bin/karma start"},"files":["src/rosie.js"],"license":"MIT","gitHead":"600af06f60b338eee360b4f198f3c9661f783ce5","bugs":{"url":"https://github.com/bkeepers/rosie/issues"},"homepage":"https://github.com/bkeepers/rosie#readme","_id":"rosie@1.2.0","_shasum":"7ab18980988eeaabd510e2ee456d28989db0973f","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"eventualbuddha","email":"me@brian-donovan.com"},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"me@brian-donovan.com"}],"dist":{"shasum":"7ab18980988eeaabd510e2ee456d28989db0973f","tarball":"https://registry.npmjs.org/rosie/-/rosie-1.2.0.tgz","integrity":"sha512-Q+kTA9HnGWzw20C8CR7+SpFzv3/fhwqIzBscP/jUF5pYfvhvS2UFyjJLHsP3N5unYHTvHJE7XKmZ92K26MyOpQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICmJNxffBGXmA7oEzZi8AGKz24UmP+zk32gl/p30gXycAiEA8tRT4ki3jeyc3cQqSLGEy1j+XV47Qdn0xsh8OpPetZI="}]},"directories":{}},"1.3.0":{"name":"rosie","version":"1.3.0","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[{"name":"Brian Donovan","email":"me@brian-donovan.com"}],"dependencies":{},"devDependencies":{"eslint":"^1.4.1","jasmine-core":"^2.4.1","karma":"^0.13.9","karma-chrome-launcher":"^0.2.0","karma-jasmine":"^0.3.6","karma-phantomjs-launcher":"^0.2.1","phantomjs":"^1.9.19"},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","scripts":{"pretest":"eslint src spec","test":"./node_modules/karma/bin/karma start --singleRun true","watch":"./node_modules/karma/bin/karma start"},"files":["src/rosie.js"],"license":"MIT","gitHead":"1e69b0173481ac5f0bc9a1c32780678294fbe041","bugs":{"url":"https://github.com/bkeepers/rosie/issues"},"homepage":"https://github.com/bkeepers/rosie#readme","_id":"rosie@1.3.0","_shasum":"69347884d8d744d38ea8f4947070c44c0669aead","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.2.0","_npmUser":{"name":"eventualbuddha","email":"me@brian-donovan.com"},"dist":{"shasum":"69347884d8d744d38ea8f4947070c44c0669aead","tarball":"https://registry.npmjs.org/rosie/-/rosie-1.3.0.tgz","integrity":"sha512-C+2jmOgyTP1p2XjAgbwKyxz9fg5UogwK/bW8A8L3VhT/IcjzJFOH9pW4lIOzzDKUWBENLvU8mFS+69goTw2g3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID6+MZqcca0OCpK9vsqgP1/pcYnMqV/+fsEIP0vUV3QnAiEAn8z5BVoMBl5+KZMs3eZ+0ojDOK9/aBpj+opN8tH3OA0="}]},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"me@brian-donovan.com"}],"directories":{}},"1.4.0":{"name":"rosie","version":"1.4.0","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[{"name":"Brian Donovan","email":"me@brian-donovan.com"}],"dependencies":{},"devDependencies":{"eslint":"^1.4.1","jasmine-core":"^2.4.1","karma":"^0.13.9","karma-chrome-launcher":"^0.2.0","karma-jasmine":"^0.3.6","karma-phantomjs-launcher":"^0.2.1","phantomjs":"^1.9.19"},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","scripts":{"pretest":"eslint src spec","test":"./node_modules/karma/bin/karma start --singleRun true","watch":"./node_modules/karma/bin/karma start"},"files":["src/rosie.js"],"license":"MIT","gitHead":"072e68a1dae783398754950faa46f9659ecbf50b","bugs":{"url":"https://github.com/bkeepers/rosie/issues"},"homepage":"https://github.com/bkeepers/rosie#readme","_id":"rosie@1.4.0","_shasum":"28074dd67581cc2de9f49b876c6e83a797a7a704","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.11.1","_npmUser":{"name":"eventualbuddha","email":"me@brian-donovan.com"},"dist":{"shasum":"28074dd67581cc2de9f49b876c6e83a797a7a704","tarball":"https://registry.npmjs.org/rosie/-/rosie-1.4.0.tgz","integrity":"sha512-19VxAP/gsBYrJ2cwUsnHdxlwqMVcFSJGDJrr2J+O/mgVx/OJXnPaSonmEPOM1gEwHr4II1Lk1UdfzqjfxP1lWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGSVE7ylZsNTQEwFVEhKjGnaWAee0pAEib97S/nWYo1xAiAPDoTIaOzUxRkAMH1reO4Fft4ASYPZJqwrfW6CkknNjw=="}]},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"me@brian-donovan.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/rosie-1.4.0.tgz_1464028815738_0.6912383160088211"},"directories":{}},"1.6.0":{"name":"rosie","version":"1.6.0","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[{"name":"Brian Donovan","email":"me@brian-donovan.com"}],"dependencies":{},"devDependencies":{"eslint":"^1.4.1","jasmine-core":"^2.4.1","karma":"^0.13.9","karma-chrome-launcher":"^0.2.0","karma-jasmine":"^0.3.6","karma-phantomjs-launcher":"^0.2.1","phantomjs":"^1.9.19"},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","scripts":{"pretest":"eslint src spec","test":"./node_modules/karma/bin/karma start --singleRun true","watch":"./node_modules/karma/bin/karma start"},"files":["src/rosie.js"],"license":"MIT","gitHead":"e99bb6137aeaa1edbff2cad13f72af5757e51abc","bugs":{"url":"https://github.com/bkeepers/rosie/issues"},"homepage":"https://github.com/bkeepers/rosie#readme","_id":"rosie@1.6.0","_shasum":"bc0ef64cd401d00794450d5792c0276e226b6ab0","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.0","_npmUser":{"name":"eventualbuddha","email":"me@brian-donovan.com"},"dist":{"shasum":"bc0ef64cd401d00794450d5792c0276e226b6ab0","tarball":"https://registry.npmjs.org/rosie/-/rosie-1.6.0.tgz","integrity":"sha512-4EnKmtQCij5HvDCWXinRaX0wsyWELM8CFSh1CSRU30esXo+H8mMJK53H3BJV8E+NxTf0eFdBBUbIb9t3/QK2FA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjIuF+YOB1cfs79r1JlxBT3qRpmiPvvuCJfhw711dRbgIgCkEUk1f+T/6CoZhKPUyaTIXG1ba++NV6P0a6GtZnAT0="}]},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"me@brian-donovan.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/rosie-1.6.0.tgz_1465530480345_0.5088572127278894"},"directories":{}},"2.0.0":{"name":"rosie","version":"2.0.0","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[{"name":"Brian Donovan","email":"me@brian-donovan.com"}],"dependencies":{},"devDependencies":{"electron":"^1.3.4","eslint":"^3.4.0","jasmine-core":"^2.4.1","karma":"^1.2.0","karma-electron":"^4.1.0","karma-jasmine":"^1.0.2"},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/bkeepers/rosie.git"},"main":"src/rosie.js","scripts":{"pretest":"eslint src spec","test":"./node_modules/karma/bin/karma start --singleRun true","watch":"./node_modules/karma/bin/karma start"},"files":["src/rosie.js"],"license":"MIT","licenseText":"rosie is a factory for building JavaScript objects\n\nCopyright © 2012  Brandon Keepers <brandon@opensoul.org>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","_id":"rosie@2.0.0","dist":{"shasum":"53a07267bf396c9b7b01881284f9b8984a3c3c86","tarball":"https://registry.npmjs.org/rosie/-/rosie-2.0.0.tgz","fileCount":6,"unpackedSize":29116,"integrity":"sha512-YEVmYwLdQAgQMKiFDw77UlaKi+kAlvCxahT8H1mfICmd0VVQoE64Q54llG0fSw1hp3q8xTJfR+EHafFkUN7+HQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOsxQVrr8ajQLldGHE1wXg0yPRRW29XKfu/tmoLWV8nQIgT4wRQnBxC00JSnVmyS1YIdy0cANfVCuHSTIWoyzKT5M="}]},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"me@brian-donovan.com"}],"_npmUser":{"name":"eventualbuddha","email":"me@brian-donovan.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rosie_2.0.0_1523320221747_0.6621146541505931"},"_hasShrinkwrap":false},"2.0.1":{"name":"rosie","version":"2.0.1","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[{"name":"Brian Donovan","email":"me@brian-donovan.com"}],"dependencies":{},"devDependencies":{"eslint":"^3.4.0","jest":"^22.4.3"},"engines":{"node":"*"},"repository":{"type":"git","url":"git://github.com/rosiejs/rosie.git"},"main":"src/rosie.js","scripts":{"pretest":"eslint src","test":"jest","watch":"jest --watch"},"files":["src/rosie.js"],"license":"MIT","licenseText":"rosie is a factory for building JavaScript objects\n\nCopyright © 2012  Brandon Keepers <brandon@opensoul.org>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","_id":"rosie@2.0.1","dist":{"shasum":"c250c4787ce450b72aa9eff26509f68589814fa2","tarball":"https://registry.npmjs.org/rosie/-/rosie-2.0.1.tgz","fileCount":6,"unpackedSize":28480,"integrity":"sha512-06OQ38Pv9FWviqcnDuMJ/SnQ/P9Bmcmn7i+myZVmaMPWan928V4hbwYP0lxpDpOCC4VO5h+x7HpGc/uRAZpHxA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwcpE9w5za2FNZzCnQu+Qqn8uw9/sHsuscBIcr2gFeFwIgYxdnBBqpuD3VRyLIbr+ZF/jEo243+uQhLoXWzkD3p0Q="}]},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"me@brian-donovan.com"}],"_npmUser":{"name":"eventualbuddha","email":"me@brian-donovan.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rosie_2.0.1_1523407352242_0.7192065768351021"},"_hasShrinkwrap":false},"2.1.0":{"name":"rosie","version":"2.1.0","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[{"name":"Brian Donovan"}],"dependencies":{},"devDependencies":{"eslint":"^7.9.0","eslint-config-prettier":"^6.11.0","eslint-plugin-jest":"^24.0.2","jest":"^26.4.2","prettier":"^2.1.2","prettier-check":"^2.0.0"},"engines":{"node":">=10"},"repository":{"type":"git","url":"git://github.com/rosiejs/rosie.git"},"main":"src/rosie.js","scripts":{"pretest":"eslint src && prettier-check src/rosie.js src/__tests__/rosie.test.js README.md","test":"jest","watch":"jest --watch"},"license":"MIT","gitHead":"e6338b4e66dd6b1c71afba59048618267e65edcf","bugs":{"url":"https://github.com/rosiejs/rosie/issues"},"homepage":"https://github.com/rosiejs/rosie#readme","_id":"rosie@2.1.0","_nodeVersion":"10.22.1","_npmVersion":"7.7.3","dist":{"integrity":"sha512-Dbzdc+prLXZuB/suRptDnBUY29SdGvND3bLg6cll8n7PNqzuyCxSlRfrkn8PqjS9n4QVsiM7RCvxCkKAkTQRjA==","shasum":"0213a9d2b0401a2549cbce5f1cd914caffa22358","tarball":"https://registry.npmjs.org/rosie/-/rosie-2.1.0.tgz","fileCount":4,"unpackedSize":28335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW4OuCRA9TVsSAnZWagAAgLsP/35Mf6eUMHufOy9H9TLx\n9wnr8cefVnhDYWY6OG8eOVFr1Gfe35Uqk9tHYRwznMZzfkf4WUHK3E5FqlTJ\nRYCTzRc9c2QH9wM/Pi519VpB4hb+n52gzl86kZVafupWafN74sGCggX5atli\nJe5nt5NDx0Njp829WFuQiLqFWbXgck1wHBYV2gIPgkhNUkuyVADq34Z2hGj5\nqN8A5uFm+uw/k8/IvJinqOQo2Ny3BzgguqeP9Gu6ZWmHreJtDtxus3Na9Yft\nMvaTteQtVjo1YN7z0kAhnWHWa0Pn5zPE7a+jWIt3L9OjnXlT6tauH6VoXsdl\nz6kTkVgda7/hPPB5cvukI1ifK138yoQWAVgHawiXerH9AOhzrcBUHsQ3lUve\nditwW2dP6NtA5+l+GPjpfnLYZzFdnVVXZHJDd62Ja82l3ROccCwfUiBkclQ3\n3VDFGkbYfAXXEL5YbT/qoBoR7QhF6ZMIXYfIgtdQmAzFXZBjCszpQNQGuvQC\nH62YfI8OFTHaCzrfYjOaKCbpXww9HW3n1hmucwR4HaNJTLP/9c8K2SCqw1qF\njX9BRICE2gMmpXbtqc/8Dg5y0+orwSU+g3YYhg1eZSjImfSMZvigVmp6DaW8\n4sl1XclbpKf3lSemmUJzuDAInc2n9rQ0xN1MIYr3WCS+qfkq9TDMp+rgzI63\nvqMg\r\n=wo1N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID/hIeiAb5b0OxrCPBWWkWNJhaYbyYuVJWPN3G5jriZ1AiEA4YUxvn3PPZ90cHaII7zNg5JB3P4/U0x7osputY0ZWho="}]},"_npmUser":{"name":"eventualbuddha","email":"brian@donovans.cc"},"directories":{},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"brian@donovans.cc"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rosie_2.1.0_1616610221857_0.9331861194846702"},"_hasShrinkwrap":false},"2.1.1":{"name":"rosie","version":"2.1.1","description":"factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl","keywords":["factory","rosie","test"],"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"contributors":[{"name":"Brian Donovan"}],"dependencies":{},"devDependencies":{"eslint":"^8.29.0","eslint-config-prettier":"^8.5.0","eslint-plugin-jest":"^27.1.6","jest":"^29.3.1","prettier":"^2.8.0","prettier-check":"^2.0.0"},"engines":{"node":">=10"},"repository":{"type":"git","url":"git://github.com/rosiejs/rosie.git"},"main":"src/rosie.js","scripts":{"pretest":"eslint src && prettier-check src/rosie.js src/__tests__/rosie.test.js README.md","test":"jest","watch":"jest --watch"},"license":"MIT","_id":"rosie@2.1.1","gitHead":"353f2c657ef3103b60d544dd9a8a3578786588ef","bugs":{"url":"https://github.com/rosiejs/rosie/issues"},"homepage":"https://github.com/rosiejs/rosie#readme","_nodeVersion":"20.9.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-2AXB7WrIZXtKMZ6Q/PlozqPF5nu/x7NEvRJZOblrJuprrPfm5gL8JVvJPj9aaib9F8IUALnLUFhzXrwEtnI5cQ==","shasum":"f8c9b8145d581d19fb1c933cf6ac1c554ad68798","tarball":"https://registry.npmjs.org/rosie/-/rosie-2.1.1.tgz","fileCount":4,"unpackedSize":28552,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbhnUq4B4D3UcGB68iVFqoSWEtil/IzWG9dmSQyf4QJgIhAOGevFKsQeUrek9kz8tD/wkiIARUSPVi9sW9CnXz5jA1"}]},"_npmUser":{"name":"eventualbuddha","email":"brian@donovans.cc"},"directories":{},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"brian@donovans.cc"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rosie_2.1.1_1699725415274_0.6405973362408404"},"_hasShrinkwrap":false}},"readme":"# Rosie\n\n![Rosie the Riveter](https://upload.wikimedia.org/wikipedia/commons/thumb/1/12/We_Can_Do_It%21.jpg/220px-We_Can_Do_It%21.jpg)\n\nRosie is a factory for building JavaScript objects, mostly useful for setting up test data. It is inspired by [factory_bot](https://github.com/thoughtbot/factory_bot).\n\nTo use Rosie you first define a _factory_. The _factory_ is defined in terms of _attributes_, _sequences_, _options_, _callbacks_, and can inherit from other factories. Once the factory is defined you use it to build _objects_.\n\n## Usage\n\nThere are two phases of use:\n\n1.  Factory definition\n2.  Object building\n\n**Factory Definition:** Define your factory, giving it a name and optionally a constructor function (`game` in this example):\n\n```js\nFactory.define('game')\n  .sequence('id')\n  .attr('is_over', false)\n  .attr('created_at', () => new Date())\n  .attr('random_seed', () => Math.random())\n\n  // Default to two players. If players were given, fill in\n  // whatever attributes might be missing.\n  .attr('players', ['players'], (players) => {\n    if (!players) {\n      players = [{}, {}];\n    }\n    return players.map((data) => Factory.attributes('player', data));\n  });\n\nFactory.define('player')\n  .sequence('id')\n  .sequence('name', (i) => {\n    return 'player' + i;\n  })\n\n  // Define `position` to depend on `id`.\n  .attr('position', ['id'], (id) => {\n    const positions = ['pitcher', '1st base', '2nd base', '3rd base'];\n    return positions[id % positions.length];\n  });\n\nFactory.define('disabled-player').extend('player').attr('state', 'disabled');\n```\n\n**Object Building:** Build an object, passing in attributes that you want to override:\n\n```js\nconst game = Factory.build('game', { is_over: true });\n// Built object (note scores are random):\n//{\n//    id:           1,\n//    is_over:      true,   // overriden when building\n//    created_at:   Fri Apr 15 2011 12:02:25 GMT-0400 (EDT),\n//    random_seed:  0.8999513240996748,\n//    players: [\n//                {id: 1, name:'Player 1'},\n//                {id: 2, name:'Player 2'}\n//    ]\n//}\n```\n\nFor a factory with a constructor, if you want just the attributes:\n\n```js\nFactory.attributes('game'); // return just the attributes\n```\n\n### Programmatic Generation of Attributes\n\nYou can specify options that are used to programmatically generate the attributes:\n\n```js\nconst moment = require('moment');\n\nFactory.define('matches')\n  .attr('seasonStart', '2016-01-01')\n  .option('numMatches', 2)\n  .attr('matches', ['numMatches', 'seasonStart'], (numMatches, seasonStart) => {\n    const matches = [];\n    for (const i = 1; i <= numMatches; i++) {\n      matches.push({\n        matchDate: moment(seasonStart).add(i, 'week').format('YYYY-MM-DD'),\n        homeScore: Math.floor(Math.random() * 5),\n        awayScore: Math.floor(Math.random() * 5),\n      });\n    }\n    return matches;\n  });\n\nFactory.build('matches', { seasonStart: '2016-03-12' }, { numMatches: 3 });\n// Built object (note scores are random):\n//{\n//  seasonStart: '2016-03-12',\n//  matches: [\n//    { matchDate: '2016-03-19', homeScore: 3, awayScore: 1 },\n//    { matchDate: '2016-03-26', homeScore: 0, awayScore: 4 },\n//    { matchDate: '2016-04-02', homeScore: 1, awayScore: 0 }\n//  ]\n//}\n```\n\nIn the example `numMatches` is defined as an `option`, not as an `attribute`. Therefore `numMatches` is not part of the output, it is only used to generate the `matches` array.\n\nIn the same example `seasonStart` is defined as an `attribute`, therefore it appears in the output, and can also be used in the generator function that creates the `matches` array.\n\n### Batch Specification of Attributes\n\nThe convenience function `attrs` simplifies the common case of specifying multiple attributes in a batch. Rewriting the `game` example from above:\n\n```js\nFactory.define('game')\n  .sequence('id')\n  .attrs({\n    is_over: false,\n    created_at: () => new Date(),\n    random_seed: () => Math.random(),\n  })\n  .attr('players', ['players'], (players) => {\n    /* etc. */\n  });\n```\n\n### Post Build Callback\n\nYou can also define a callback function to be run after building an object:\n\n```js\nFactory.define('coach')\n  .option('buildPlayer', false)\n  .sequence('id')\n  .attr('players', ['id', 'buildPlayer'], (id, buildPlayer) => {\n    if (buildPlayer) {\n      return [Factory.build('player', { coach_id: id })];\n    }\n  })\n  .after((coach, options) => {\n    if (options.buildPlayer) {\n      console.log('built player:', coach.players[0]);\n    }\n  });\n\nFactory.build('coach', {}, { buildPlayer: true });\n```\n\nMultiple callbacks can be registered, and they will be executed in the order they are registered. The callbacks can manipulate the built object before it is returned to the callee.\n\nIf the callback doesn't return anything, rosie will return build object as final result. If the callback returns a value, rosie will use that as final result instead.\n\n### Associate a Factory with an existing Class\n\nThis is an advanced use case that you can probably happily ignore, but store this away in case you need it.\n\nWhen you define a factory you can optionally provide a class definition, and anything built by the factory will be passed through the constructor of the provided class.\n\nSpecifically, the output of `.build` is used as the input to the constructor function, so the returned object is an instance of the specified class:\n\n```js\nclass SimpleClass {\n  constructor(args) {\n    this.moops = 'correct';\n    this.args = args;\n  }\n\n  isMoopsCorrect() {\n    return this.moops;\n  }\n}\n\ntestFactory = Factory.define('test', SimpleClass).attr('some_var', 4);\n\ntestInstance = testFactory.build({ stuff: 2 });\nconsole.log(JSON.stringify(testInstance, {}, 2));\n// Output:\n// {\n//   \"moops\": \"correct\",\n//   \"args\": {\n//     \"stuff\": 2,\n//     \"some_var\": 4\n//   }\n// }\n\nconsole.log(testInstance.isMoopsCorrect());\n// Output:\n// correct\n```\n\nMind. Blown.\n\n## Usage in Node.js\n\nTo use Rosie in node, you'll need to import it first:\n\n```js\nimport { Factory } from 'rosie';\n// or with `require`\nconst Factory = require('rosie').Factory;\n```\n\nYou might also choose to use unregistered factories, as it fits better with node's module pattern:\n\n```js\n// factories/game.js\nimport { Factory } from 'rosie';\n\nexport default new Factory().sequence('id').attr('is_over', false);\n// etc\n```\n\nTo use the unregistered `Game` factory defined above:\n\n```js\nimport Game from './factories/game';\n\nconst game = Game.build({ is_over: true });\n```\n\nA tool like [babel](https://babeljs.io) is currently required to use this syntax.\n\nYou can also extend an existing unregistered factory:\n\n```js\n// factories/scored-game.js\nimport { Factory } from 'rosie';\nimport Game from './game';\n\nexport default new Factory().extend(Game).attrs({\n  score: 10,\n});\n```\n\n## Rosie API\n\nAs stated above the rosie factory signatures can be broken into factory definition and object creation.\n\nAdditionally factories can be defined and accessed via the Factory singleton, or they can be created and maintained by the callee.\n\n### Factory declaration functions\n\nOnce you have an instance returned from a `Factory.define` or a `new Factory()` call, you do the actual of work of defining the objects. This is done using the methods below (note these are typically chained together as in the examples above):\n\n#### Factory.define\n\n- **Factory.define(`factory_name`)** - Defines a factory by name. Return an instance of a Factory that you call `.attr`, `.option`, `.sequence`, and `.after` on the result to define the properties of this factory.\n- **Factory.define(`factory_name`, `constructor`)** - Optionally pass a constuctor function, and the objects produced by `.build` will be passed through the `constructor` function.\n\n#### instance.attr:\n\nUse this to define attributes of your objects\n\n- **instance.attr(`attribute_name`, `default_value`)** - `attribute_name` is required and is a string, `default_value` is the value to use by default for the attribute\n- **instance.attr(`attribute_name`, `generator_function`)** - `generator_function` is called to generate the value of the attribute\n- **instance.attr(`attribute_name`, `dependencies`, `generator_function`)** - `dependencies` is an array of strings, each string is the name of an attribute or option that is required by the `generator_function` to generate the value of the attribute. This list of `dependencies` will match the parameters that are passed to the `generator_function`\n\n#### instance.attrs:\n\nUse this as a convenience function instead of calling `instance.attr` multiple times\n\n- **instance.attrs(`{attribute_1: value_1, attribute_2: value_2, ...}`)** - `attribute_i` is a string, `value_i` is either an object or generator function.\n\nSee `instance.attr` above for details. Note: there is no way to specify dependencies using this method, so if you need that, you should use `instance.attr` instead.\n\n#### instance.option:\n\nUse this to define options. Options do not appear in the generated object, but they can be used in a `generator_function` that is used to configure an attribute or sequence that appears in the generated object. See the [Programmatic Generation Of Attributes](#programmatic-generation-of-attributes) section for examples.\n\n- **instance.option(`option_name`, `default_value`)** - `option_name` is required and is a string, `default_value` is the value to use by default for the option\n- **instance.option(`option_name`, `generator_function`)** - `generator_function` is called to generate the value of the option\n- **instance.option(`option_name`, `dependencies`, `generator_function`)** - `dependencies` is an array of strings, each string is the name of an option that is required by the `generator_function` to generate the value of the option. This list of `dependencies` will match the parameters that are passed to the `generator_function`\n\n#### instance.sequence:\n\nUse this to define an auto incrementing sequence field in your object\n\n- **instance.sequence(`sequence_name`)** - define a sequence called `sequence_name`, set the start value to 1\n- **instance.sequence(`sequence_name`, `generator_function`)** - `generator_function` is called to generate the value of the sequence. When the `generator_function` is called the pre-incremented sequence number will be passed as the first parameter, followed by any dependencies that have been specified.\n- **instance.sequence(`sequence_name`, `dependencies`, `generator_function`)** - `dependencies` is an array of strings, each string is the name of an attribute or option that is required by the `generator_function` to generate the value of the option. The value of each specified dependency will be passed as parameters 2..N to the `generator_function`, noting again that the pre-incremented sequence number is passed as the first parameter.\n\n#### instance.after:\n\n- **instance.after(`callback`)** - register a `callback` function that will be called at the end of the object build process. The `callback` is invoked with two params: (`build_object`, `object_options`). See the [Post Build Callback](#post-build-callback) section for examples.\n\n### Object building functions\n\n#### build\n\nReturns an object that is generated by the named factory. `attributes` and `options` are optional parameters. The `factory_name` is required when calling against the rosie Factory singleton.\n\n- **Factory.build(`factory_name`, `attributes`, `options`)** - when build is called against the rosie Factory singleton, the first param is the name of the factory to use to build the object. The second is an object containing attribute override key value pairs, and the third is a object containing option key value pairs\n- **instance.build(`attributes`, `options`)** - when build is called on a factory instance only the `attributes` and `options` objects are necessary\n\n#### buildList\n\nIdentical to `.build` except it returns an array of built objects. `size` is required, `attributes` and `options` are optional\n\n- **Factory.buildList(`factory_name`, size, `attributes`, `options`)** - when buildList is called against the rosie Factory singleton, the first param is the name of the factory to use to build the object. The `attributes` and `options` behave the same as the call to `.build`.\n- **instance.buildList(size, `attributes`, `options`)** - when buildList is called on a factory instance only the size, `attributes` and `options` objects are necessary (strictly speaking only the size is necessary)\n\n### Testing\n\nYou may find `resetAll` useful when working with testing frameworks such as Jest. It resets any build state, such as sequences, to their original values:\n\n```js\nimport Factory from 'rosie';\n\nbeforeEach(() => {\n  Factory.resetAll();\n});\n```\n\nOr call `reset` on a specific factory:\n\n```js\nimport Game from './game';\n\nbeforeEach(() => {\n  Game.reset();\n});\n```\n\n## Contributing\n\n1.  Fork it\n1.  Create your feature branch (`git checkout -b my-new-feature`)\n1.  Install the test dependencies (`yarn install` - requires NodeJS and yarn)\n1.  Make your changes and make sure the tests pass (`yarn test`)\n1.  Commit your changes (`git commit -am 'Added some feature'`)\n1.  Push to the branch (`git push origin my-new-feature`)\n1.  Create new Pull Request\n\n## Credits\n\nThanks to [Daniel Morrison](http://twitter.com/danielmorrison/status/58883772040486912) for the name and [Jon Hoyt](http://twitter.com/jonmagic) for inspiration and brainstorming the idea.\n","maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"eventualbuddha","email":"brian@donovans.cc"}],"time":{"modified":"2023-11-11T17:56:55.652Z","created":"2012-10-08T20:17:57.437Z","0.1.0":"2012-10-08T20:18:00.396Z","0.1.1":"2012-10-10T01:40:37.351Z","0.2.0":"2013-05-24T12:41:14.740Z","0.3.0":"2014-05-06T23:46:41.931Z","0.3.1":"2014-06-03T15:13:46.942Z","0.4.0":"2015-02-11T20:01:00.528Z","0.4.1":"2015-04-01T23:14:48.660Z","0.4.2":"2015-06-18T02:49:02.525Z","1.0.0":"2015-08-12T22:05:25.370Z","1.1.0":"2015-08-18T22:16:27.235Z","1.2.0":"2015-09-15T17:10:47.965Z","1.3.0":"2016-01-18T15:13:55.497Z","1.4.0":"2016-05-23T18:40:16.194Z","1.6.0":"2016-06-10T03:48:00.846Z","2.0.0":"2018-04-10T00:30:21.800Z","2.0.1":"2018-04-11T00:42:32.390Z","2.1.0":"2021-03-24T18:23:42.019Z","2.1.1":"2023-11-11T17:56:55.482Z"},"author":{"name":"Brandon Keepers","email":"brandon@opensoul.org"},"repository":{"type":"git","url":"git://github.com/rosiejs/rosie.git"},"keywords":["factory","rosie","test"],"contributors":[{"name":"Brian Donovan"}],"readmeFilename":"README.md","users":{"jklassen":true,"abneroliveira":true,"mmoshnogorskiy":true,"nickleefly":true,"nauhil":true,"uxabdullah":true},"license":"MIT","homepage":"https://github.com/rosiejs/rosie#readme","bugs":{"url":"https://github.com/rosiejs/rosie/issues"}}