{"_id":"mongoose-context-ref","_rev":"54-ab7b4bc0b5d0d4088cc2dc42257a6c35","name":"mongoose-context-ref","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","dist-tags":{"latest":"2.1.3"},"versions":{"1.0.0":{"name":"mongoose-context-ref","version":"1.0.0","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose"},"devDependencies":{"should":"~3.1.2","grunt":"~0.4.2","grunt-contrib-jshint":"~0.7.0","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.5.3","time-grunt":"~0.2.9","mongoose":"^3.8.8","lodash":"^2.4.1"},"_id":"mongoose-context-ref@1.0.0","dist":{"shasum":"e27340650860383110238fc99fbe1abb9f0a18e5","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-1.0.0.tgz","integrity":"sha512-iVvlUmKGrVFevruv8rtqzT6HLyHI5hupu1GuEysou+sZh7aVHmSrp2JXoW7SjMsKByHp7z9qgZ6x0SeopGDN3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2w1SzfSk9MnguprnqKuetkMCQjswsVHGIA2IXADBSwAiEAhX8MBQeRQZtxmYRlbQgIVnuBD7A/tVBb6OPJmCjGyMg="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"1.1.0":{"name":"mongoose-context-ref","version":"1.1.0","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose"},"devDependencies":{"should":"~3.1.2","grunt":"~0.4.2","grunt-contrib-jshint":"~0.7.0","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.5.3","time-grunt":"~0.2.9","mongoose":"^3.8.8","lodash":"^2.4.1"},"_id":"mongoose-context-ref@1.1.0","dist":{"shasum":"9af62607146af9d79a1c68827437485ebd03440c","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-1.1.0.tgz","integrity":"sha512-SLHhdCQxgnrP2GvbHEf7PQWhNOdPxkvan4hc2LRFHUWQF3Yni61h5nBJvcOsst2ERAhnwuJ1F0hpPgmpVxbbVg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFmaQW5uwbx5YH/f6GMBJfXP7p8pc+kQ/U04wAp8xcGHAiAbTgIc9UZImhAx4fNMO11qr9Mb1Xs1TcBVsVTB1Fr9fg=="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"1.1.1":{"name":"mongoose-context-ref","version":"1.1.1","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose"},"devDependencies":{"should":"~3.1.2","grunt":"~0.4.2","grunt-contrib-jshint":"~0.7.0","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.5.3","time-grunt":"~0.2.9","mongoose":"^3.8.8","lodash":"^2.4.1"},"_id":"mongoose-context-ref@1.1.1","dist":{"shasum":"199188122a62b9b4d8150c9b6d3fc0bce33c3201","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-1.1.1.tgz","integrity":"sha512-24yPVdab6zYPLRoBXD3nt23qtyFrqbSyKYlfNBRwwqRBqna/HZ8S2Pe+mHygSo/ao+1xO7eMk+CiByTp8tKNJA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBkndLenLkqIO04UmCzTYwgnzlmNri7UQKrfUOoUzoL8AiB1Jsn4jr5F7oNup5logJEL7Ns60LzuhRsTiG/tmZUqJw=="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"1.1.2":{"name":"mongoose-context-ref","version":"1.1.2","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose"},"devDependencies":{"should":"~3.1.2","grunt":"~0.4.2","grunt-contrib-jshint":"~0.7.0","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.5.3","time-grunt":"~0.2.9","mongoose":"^3.8.8","lodash":"^2.4.1"},"_id":"mongoose-context-ref@1.1.2","dist":{"shasum":"ceeaa6a57bf77a2ba3c5744a4e5ba88e1d4727f9","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-1.1.2.tgz","integrity":"sha512-kvQUAhyC3vdsfBsuMJhh7GJsAXhuGQ49PdbuX57/Vf7rYFiy2egkTs3dw6zXN9imQ+tN0QTv88PN9lTFPyRQQA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFeq7S+cDT91n39pE9D1yuiNG1LaZ2bO5TiiZ964kuuyAiAE2+FqiHDY+0WEnp3e5qEoGNxZ11tPyTE2d8y3l+6rTw=="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"1.1.3":{"name":"mongoose-context-ref","version":"1.1.3","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"keywords":["mongoose","context","references","relations"],"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose"},"devDependencies":{"should":"~3.1.2","grunt":"~0.4.2","grunt-contrib-jshint":"~0.7.0","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.5.3","time-grunt":"~0.2.9","mongoose":"^3.8.8","lodash":"^2.4.1"},"_id":"mongoose-context-ref@1.1.3","dist":{"shasum":"fd4713b37bf56d9399e40ed7e33c021dcaf6416a","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-1.1.3.tgz","integrity":"sha512-G8XKR+VeqtGyBQwLFcv7/ZJPcuny3oi52nMnuvALtmTmMBAMuNBSIKHRnfZ0aBX9sfvN18Ut1BHd8LlktXtvhg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD14hWDZTOQIDqGa8KTWd5ADNBB5aP5J4QPgeNwvuGzegIgJ6XC1O1OkHgyiNU3EdbAT7Up0TV90U+LfkC+aALAIEU="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"1.2.0":{"name":"mongoose-context-ref","version":"1.2.0","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"keywords":["mongoose","context","references","relations"],"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose"},"devDependencies":{"should":"~3.1.3","grunt":"~0.4.2","grunt-contrib-jshint":"~0.8.0","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.5.3","time-grunt":"~0.2.10","mongoose":"^3.8.8","lodash":"^2.4.1"},"_id":"mongoose-context-ref@1.2.0","dist":{"shasum":"a88d0a283ea69e94619573b5ea46317275f580d9","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-1.2.0.tgz","integrity":"sha512-RKiPwLCbEIKi5sZv4+3Z/cgpVSGdndZaRGikKcW+p0E0pGtGp8kFBdq9s53K1dILNtoV+I0KHPiuNxJ36XPGpQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGBzwP5DwSJaYpqetnXG2v2LRXjV//jSf5I0PZ16DEBjAiEAngSeofvlctBRb8GScubqWXOljK75RazXITP2/qQJnk0="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"1.3.0":{"name":"mongoose-context-ref","version":"1.3.0","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"keywords":["mongoose","context","references","relations"],"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose"},"devDependencies":{"should":"~3.1.3","grunt":"~0.4.2","grunt-contrib-jshint":"~0.8.0","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.5.3","time-grunt":"~0.2.10","mongoose":"^3.8.8","lodash":"^2.4.1"},"_id":"mongoose-context-ref@1.3.0","dist":{"shasum":"b026660d41455937ccfd2134a3b9ef59ae3343f4","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-1.3.0.tgz","integrity":"sha512-0tra0a4DzZcF6GH2Ih2tvyNLHsK1I9kan+YXnl9asjiWeJl2LonRwhHMZAhz5KgiWkdNx0sEEBmnML3U9Pwc9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHK2OsQKD4+zFyF+CG+R1uc2/2Ne4xOvvBSD/i1+njwtAiAlDFAZ0fg1GJIsYS7GmpHZZjiPRTeVtep85LEX/PLcbA=="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"1.3.1":{"name":"mongoose-context-ref","version":"1.3.1","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"keywords":["mongoose","context","references","relations"],"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose"},"devDependencies":{"should":"~3.1.3","grunt":"~0.4.2","grunt-contrib-jshint":"~0.8.0","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.5.3","time-grunt":"~0.2.10","mongoose":"^3.8.8","lodash":"^2.4.1"},"_id":"mongoose-context-ref@1.3.1","dist":{"shasum":"97457a43db84be68abf77813274d9b1929bdd145","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-1.3.1.tgz","integrity":"sha512-2Q9cTLwHox8eqphM886FqFoXkrOg2fG7stqG+FTfC7FPw1YA7V9/KY9LDTfDMTHaf1CQVXkOON1VO5uAMZrdsw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEcJeH0kJXPkMKr9kjqALURsh9YAJGc1ZZrZ5/01fNuaAiAK5voZac4LsLx49046kDLUxYx6yswM0MyAq5MwHRWmHA=="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"1.4.1":{"name":"mongoose-context-ref","version":"1.4.1","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"keywords":["mongoose","context","references","relations"],"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose"},"devDependencies":{"should":"~3.1.3","grunt":"~0.4.2","grunt-contrib-jshint":"~0.8.0","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.5.3","time-grunt":"~0.2.10","mongoose":"^3.8.8","lodash":"^2.4.1"},"_id":"mongoose-context-ref@1.4.1","dist":{"shasum":"1f2dabf4826f08453471b42ee1fdc83d4e81e4ca","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-1.4.1.tgz","integrity":"sha512-/A3jfd0WpqRVlJzAR8IU52KyKTEHESEqBHeB0Bt9RAqfqsn0VHdYL3bJ5X9Gn0RrA03Pq8AwNzEk2MrmAQ2/hw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFkYYsZp7+rDw6Hu6Gbm2ULfBTmwjD+IvB9Na6Tx7KuMAiEAtOEGj59EWRN2sAqVD0QIP7JusfTHrM/VrHZFwXoourU="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"1.4.2":{"name":"mongoose-context-ref","version":"1.4.2","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"keywords":["mongoose","context","references","relations"],"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose"},"devDependencies":{"should":"~3.2.0","grunt":"~0.4.2","grunt-contrib-jshint":"~0.9.2","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.6.1","time-grunt":"~0.3.1","mongoose":"^3.8.8","lodash":"^2.4.1"},"_id":"mongoose-context-ref@1.4.2","dist":{"shasum":"6ea96b1218bcc25d784981868c689dc224fb3268","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-1.4.2.tgz","integrity":"sha512-+2rSLu+RwBVfO+YMpq/1GjZJS/PfZfVVFqqYzT48u1IqdQu49xnAOL/V1nvGUASRnVmJXjLnHxTbqaH0fkDBVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGgHtjtHIAmB9nYZjx2qmBEOdvzeQjGOdHPbi2aVK1TOAiEA6ZW6A6DdHPeuS4HySNJwa/R8DfMN6fAZkvHji//5ark="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"1.5.0":{"name":"mongoose-context-ref","version":"1.5.0","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"keywords":["mongoose","context","references","relations"],"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose"},"devDependencies":{"should":"~3.2.0","grunt":"~0.4.2","grunt-contrib-jshint":"~0.9.2","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.6.1","time-grunt":"~0.3.1","mongoose":"^3.8.8","lodash":"^2.4.1"},"_id":"mongoose-context-ref@1.5.0","dist":{"shasum":"32d0c9954eff091da6805ffc1a6db7a40b5fdac5","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-1.5.0.tgz","integrity":"sha512-2ajtj31R2+HGL7C2/uTA1VkuHq8bFOIeu4UlEklOmr8LQgCQTy5sE9W9vn5ofXTVNoE6FEYgb8Kbfe2QRaFBmQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF/Q0qImmhUg9BqRpNlUTHK8MEjeMCM/k1dCfEX4xc5qAiEAryt7aOKQ6H3PcmCd019cEsSb10iHdNXGYDwbENjSVtw="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"1.6.0":{"name":"mongoose-context-ref","version":"1.6.0","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"keywords":["mongoose","context","references","relations"],"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose"},"devDependencies":{"should":"~3.2.0","grunt":"~0.4.2","grunt-contrib-jshint":"~0.9.2","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.6.1","time-grunt":"~0.3.1","mongoose":"^3.8.8","lodash":"^2.4.1"},"_id":"mongoose-context-ref@1.6.0","dist":{"shasum":"00c2bb1f620574628e40753340a754d0561d7448","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-1.6.0.tgz","integrity":"sha512-fdZZqI+M7KoS2ntnjPg4j6nLfxSQaokEvCmTXre+G7+JZ+k4RKmQ+pFKRBiphJcIgfNER341i1C5LSMO0fUTpg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBkYwXMcU/Ajidho1C+GOs/ngY/qhke/n+Akl6bImyfTAiAMlWlPuwaLYlK+Bgxvzb4fAEjApLNHyTEd6eduDSaKNw=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"2.0.0":{"name":"mongoose-context-ref","version":"2.0.0","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"keywords":["mongoose","context","references","relations"],"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose"},"devDependencies":{"should":"~3.2.0","grunt":"~0.4.2","grunt-contrib-jshint":"~0.9.2","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.6.1","time-grunt":"~0.3.1","mongoose":"^3.8.8","lodash":"^2.4.1"},"_id":"mongoose-context-ref@2.0.0","dist":{"shasum":"5997b904d9fb77f461dacaaf176ec4ed6860ada3","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-2.0.0.tgz","integrity":"sha512-tC4Hq+XDdxkKYrP6GpSk/FOi73lObAMoz9SmZp9keEqxVFjLnCEt597JmncwIlJol09DryUwhP3V5N2Lk4fDTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8DCXKUM8EaLKFzJitqf8GzIuHp18Ra8SjeVlNk3nW+wIgSYwxr+7ITmekAkvMcuYSZWKPKIYalt5R8wZyqWg6+HQ="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"2.0.1":{"name":"mongoose-context-ref","version":"2.0.1","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"keywords":["mongoose","context","references","relations"],"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose","coverage":"mocha -t 0 --require blanket -R html-cov test/*.test.js > coverage.html"},"config":{"blanket":{"data-cover-never":"node_modules","pattern":["lib/"]}},"devDependencies":{"should":"~3.2.0","grunt":"~0.4.2","grunt-contrib-jshint":"~0.9.2","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.6.1","time-grunt":"~0.3.1","mongoose":"^3.8.8","lodash":"^2.4.1","blanket":"1.1.6","sinon":"~1.9.1"},"_id":"mongoose-context-ref@2.0.1","dist":{"shasum":"d454810058dc23cce68123faa2e9e50ffd7984ba","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-2.0.1.tgz","integrity":"sha512-8pwDir2zRgROuYCbcIDzH8dw37GomWImpZNuaSjKOAuVwGVIfFApZ+qZZhPQT002eEcD5cpwPdWXby4VacX7Yg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFSivMg+s3vK2Mwd1PYXpt5/GKMqgXfi8sUe50DiqIZ4AiEAhdvMM/ok+PQLMc+U7zGGBWW7sEFJ7gWxZtOWpIO0CmM="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"2.1.0":{"name":"mongoose-context-ref","version":"2.1.0","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"keywords":["mongoose","context","references","relations"],"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"test":"grunt --verbose","coverage":"mocha -t 0 --require blanket -R html-cov test/*.test.js > coverage.html"},"config":{"blanket":{"data-cover-never":"node_modules","pattern":["lib/"]}},"devDependencies":{"should":"~3.2.0","grunt":"~0.4.2","grunt-contrib-jshint":"~0.9.2","grunt-simple-mocha":"~0.4.0","grunt-contrib-watch":"~0.6.1","time-grunt":"~0.3.1","mongoose":"^3.8.8","lodash":"^2.4.1","blanket":"1.1.6","sinon":"~1.9.1"},"_id":"mongoose-context-ref@2.1.0","dist":{"shasum":"38f7f86cf52084e4e3aa5ee21de3cf2222ff1d72","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-2.1.0.tgz","integrity":"sha512-1D8O5RzJ7N9nvHjaehdyrhxMl6h5Txk0QI3y+jsEGr9PbX2cMVVb5SGCQLwhc1N+OgohRDBOO5cOy+zY6ZaTSQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTwL1GSSYVummNsvQjSc9/Ol19my3PROvOo27fj/y/TAIgZ+CBa1b0Fv6MOkgvQMgbI4hM1uw3zbdiWywDS3QrUr8="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}]},"2.1.1":{"name":"mongoose-context-ref","version":"2.1.1","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"keywords":["mongoose","context","references","relations"],"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"ci":"grunt --verbose","test":"grunt","coverage":"mocha -t 0 --require blanket -R html-cov test/*.test.js > coverage.html"},"config":{"blanket":{"data-cover-never":"node_modules","pattern":["lib/"],"spec-cov":{"threshold":80,"localThreshold":80,"lcovOutput":"lcov"}}},"devDependencies":{"blanket":"1.1.6","coveralls":"^2.10.0","grunt":"~0.4.2","grunt-contrib-jshint":"~0.10.0","grunt-contrib-watch":"~0.6.1","grunt-simple-mocha":"~0.4.0","lodash":"^2.4.1","mocha-make-stub":"^2.0.0","mocha-spec-cov-alt":"~0.1.1","mongoose":"^3.8.8","should":"~3.3.1","sinon":"~1.9.1","time-grunt":"~0.3.1"},"dependencies":{"deoopfy":"^1.0.2"},"_id":"mongoose-context-ref@2.1.1","_shasum":"1f3aeacdd389e8c17e8f0b3c6952ced7eaddda1d","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}],"dist":{"shasum":"1f3aeacdd389e8c17e8f0b3c6952ced7eaddda1d","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-2.1.1.tgz","integrity":"sha512-aR8MoWjsT3RZv3FiR7O5HtXzJDeKs8Tfxcl9Ifj2pWCB2xRBIHJz27ML8gVDTn2Q+g02w9cuPNhFnwBF2utKZg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGg6E1SC3woUdLhmhr6EkSNgCQm0kZHJDJoqfsQOEvb+AiEAlwkTvybz1O4iRWJXt3BV+JY3lbHoqIXrz3gmVIsPgDQ="}]}},"2.1.2":{"name":"mongoose-context-ref","version":"2.1.2","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"keywords":["mongoose","context","references","relations"],"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"ci":"grunt --verbose","test":"grunt","coverage":"mocha -t 0 --require blanket -R html-cov test/*.test.js > coverage.html"},"config":{"blanket":{"data-cover-never":"node_modules","pattern":["lib/"],"spec-cov":{"threshold":80,"localThreshold":80,"lcovOutput":"lcov"}}},"devDependencies":{"blanket":"1.1.6","coveralls":"^2.10.0","grunt":"~0.4.2","grunt-contrib-jshint":"~0.10.0","grunt-contrib-watch":"~0.6.1","grunt-simple-mocha":"~0.4.0","lodash":"^2.4.1","mocha-make-stub":"^2.0.0","mocha-spec-cov-alt":"~0.1.1","mongoose":"^3.8.8","should":"~3.3.1","sinon":"~1.9.1","time-grunt":"~0.3.1"},"dependencies":{"deoopfy":"^1.0.2"},"gitHead":"95e8256f58f4f23a1d6c636f002d433a8565d985","_id":"mongoose-context-ref@2.1.2","_shasum":"44adb736eb36e099d384d2c7155d67c0758e8d9e","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}],"dist":{"shasum":"44adb736eb36e099d384d2c7155d67c0758e8d9e","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-2.1.2.tgz","integrity":"sha512-VWHno1kCOPM6jb9maMMY7OAqSv8MsuFRT+4FfPjggq5I2aHIsJsd5gXwdlTcg2itiuoBqLnxqNZuidNxn1a+Zw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+xCRw4cnjwbFs8xB3ophnGWQiorDRegkcQDK6d6iZjAIgZkJz7u//sCvgS65odCigBi+kUeGyS51noJ5DVInxSck="}]}},"2.1.3":{"name":"mongoose-context-ref","version":"2.1.3","main":"lib/index.js","description":"A mongoose plugin which adds a simple `context` or `parent` like relation between a model's document and variable model parent document","homepage":"https://github.com/yamadapc/mongoose-context-ref","bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"keywords":["mongoose","context","references","relations"],"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"licenses":[{"type":"MIT"}],"scripts":{"ci":"grunt --verbose","test":"grunt","coverage":"mocha -t 0 --require blanket -R html-cov test/*.test.js > coverage.html"},"config":{"blanket":{"data-cover-never":"node_modules","pattern":["lib/"],"spec-cov":{"threshold":80,"localThreshold":80,"lcovOutput":"lcov"}}},"devDependencies":{"blanket":"1.1.6","coveralls":"^2.10.0","grunt":"~0.4.2","grunt-contrib-jshint":"~0.10.0","grunt-contrib-watch":"~0.6.1","grunt-simple-mocha":"~0.4.0","lodash":"^2.4.1","mocha-make-stub":"^2.0.0","mocha-spec-cov-alt":"~0.1.1","mongoose":"^3.8.8","should":"~3.3.1","sinon":"~1.9.1","time-grunt":"~0.3.1"},"dependencies":{"deoopfy":"^1.0.2"},"gitHead":"cbcdab572a2635abf8178fa56b0122b84f15bd12","_id":"mongoose-context-ref@2.1.3","_shasum":"924c45f2713537ad7ef7a9ae145a626a157e0b1b","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"yamadapc","email":"tacla.yamada@gmail.com"},"maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}],"dist":{"shasum":"924c45f2713537ad7ef7a9ae145a626a157e0b1b","tarball":"https://registry.npmjs.org/mongoose-context-ref/-/mongoose-context-ref-2.1.3.tgz","integrity":"sha512-JHhM/Qx0fX43updgtFSzEijpTvWH7RXbSpgHYLnHTaxGgkP8LUMNPkaTgsc0fBcqPKF+U11/3tPnCXYtaex9KQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEly/7DLsk32uLK7HSpkambJrxgK3FxsUrg9ec6jOtZ2AiEApnGzi+8+/W+9K21WgXW18hb+u/P6kkxAaxLymp6/gRo="}]}}},"readme":"mongoose-context-ref\n====================\n\n[![Build Status](https://secure.travis-ci.org/yamadapc/mongoose-context-ref.png?branch=master)](http://travis-ci.org/yamadapc/mongoose-context-ref)\n[![Code Climate](https://codeclimate.com/github/yamadapc/mongoose-context-ref.png)](https://codeclimate.com/github/yamadapc/mongoose-context-ref)\n[![Coverage Status](https://coveralls.io/repos/yamadapc/mongoose-context-ref/badge.png?branch=master)](https://coveralls.io/r/yamadapc/mongoose-context-ref?branch=master)\n[![Dependency Status](https://david-dm.org/yamadapc/mongoose-context-ref.png)](https://david-dm.org/yamadapc/mongoose-context-ref)\n[![devDependency Status](https://david-dm.org/yamadapc/mongoose-context-ref/dev-status.png)](https://david-dm.org/yamadapc/mongoose-context-ref#info=devDependencies)\n\n---\n\n*Mongoose context ref* is a [mongoose](https://github.com/learnboost/mongoose)\nplugin, which adds a simple `context` or `parent` like relation between a\nmodel's document and variable model parent document.\n\nIt adds the fields:\n```javascript\n{\n  context_id: ObjectId,\n  context_type: String\n}\n```\n\nIt also adds pre 'save' and 'remove' hooks, updating the context's reference to\nthe child document (currently at the child document's pluralized lowercase model\nname) and validating the context_id for existence.\n\n## Examples\n\n### Install with\n\n`npm install mongoose-context-ref`\n\n### Comments to multiple types of models\n\n```javascript\nvar mongoose = require('mongoose'),\n    context  = require('mongoose-context-ref');\n\nvar PostSchema = new mongoose.Schema({\n  comments: [mongoose.Schema.ObjectId] // A post may be a comment thread\n});\n\nvar Post = mongoose.model('Post', PostSchema);\n\nvar CommentSchema = new mongoose.Schema({\n  text: String,\n  comments: [mongoose.Schema.ObjectId] // A comment may be a comment thread\n});\n\nCommentSchema.plugin(context);\n\nvar Comment = mongoose.model('Comment', CommentSchema);\n```\n\nThis way, when a comment is created, it may reference to either a post or\nanother comment.\n\nWhen it's saved, this reference will be validated, and the\nreferenced document will have the newly created comment's id pushed into its\n`comments` Array.\n\nAlso, when its context is modified (either the `context_type` or `context_id`),\nthe references will be updated. In this case, the old context's reference will be\nremoved, and a new reference will be added to the new parent.\n\nAnalogously, when it's removed, its reference will be removed from its context's\n`comments` Array.\n\n## Virtuals\n\nBy default, if a `context_types` array is passed, *mongoose-context-ref* adds\nvirtuals for all contexts, which update the context fields and work as one would\nexpect:\n\n```javascript\nvar mongoose = require('mongoose'),\n    context  = require('mongoose-context-ref');\n\nvar CommentSchema = new mongoose.Schema({\n  text: String,\n  comments: [mongoose.Schema.ObjectId]\n});\n\nCommentSchema.plugin(context, { context_types: ['Post', 'Comment'] })\n\nvar Comment = mongoose.model('Comment', CommentSchema);\n\nvar comment = new Comment();\ncomment.post = new mongoose.Types.ObjectId(); // => ObjectId(\"532280b6fed4c6f00d0dce60\")\n// this sets:\ncomment.context_type // => 'Post'\ncomment.context_id   // => ObjectId(\"532280b6fed4c6f00d0dce60\")\n\ncomment.comment = new mongoose.Types.ObjectId(); // => ObjectId(\"532280fcfed4c6f00d0dce61\");\n// this sets\ncomment.context_type // => 'Comment'\ncomment.context_id   // => ObjectId(\"532280fcfed4c6f00d0dce61\")\n\n// .... you get the point\n// ----------------------------------------------------------------------------\n// also:\nvar comment2 = new Comment({\n  context_type: 'Post',\n  context_id: '532280fcfed4c6f00d0dce63'\n});\n\ncomment2.post    // => ObjectId(\"532280fcfed4c6f00d0dce63\")\ncomment2.comment // => undefined\n```\n\n## Serialization\n\nBy default, `mongoose-context-ref` overwrites the `.toJSON` method, with a\nversion which serializes the document, by merging its `context_type` and\n`context_id` fields. This may be turned off by setting `serialize` option to\nfalse.\n\n```javascript\nvar comment = new Comment({\n  post: '532280fcfed4c6f00d0dce63'\n});\n\ncomment.toJSON()\n// => { post: ObjectId(\"532280fcfed4c6f00d0dce63\"), _id: ObjectId(...\ncomment.toObject()\n// => { context_type: 'Post', context_id: ObjectId(...\n```\n\n## Queries\n\n`mongoose-context-ref` adds a `withContext` static method to its target Schemas.\nThis method, provides an overloaded `.find` method, which is able to parse out\nserialized contexts into their `context_type && context_id` representations.\n\n```javascript\nComment.withContext({\n  post: '532280fcfed4c6f00d0dce63'\n});\n```\nThis will return a mongoose.Query object, equivalent to calling:\n```javascript\nComment.find({\n  context_type: 'Post',\n  context_id: '532280fcfed4c6f00d0dce63'\n});\n```\n\nNote that all the case serialization, and `context_type` validation logic, still\napplies when it's parsing contexts. It won't, for instance, detect camel case\nfields, if the plugin was added with snake case, and it will ignore invalid\ncontext types.\n\n## Options\n\nAs per mongoose plugins' convention, the plugin is added to a Model with:\n```javascript\n// [...]\nvar context = require('../lib/mongoose-context-ref');\nModelSchema.plugin(context, options)\n// [...]\n```\n\nWhere `options` may have the fields:\n\n- `required` - whether `/context_(id|type)/` are required fields (defaults to\n  `false`)\n- `context_types` - either an `Array` of the valid `context_type` values\n  (defaulting to all existing modelNames) or a validator `Function`, which\n  will be passed directly as the `context_type` path's [mongoose validator](http://mongoosejs.com/docs/api.html#schematype_SchemaType-validate).\n- `virtuals` - if set to false disables the [virtuals](#virtuals) feature\n  (defaults to true)\n- `refUpdate` - if set to false disables the [reference updating](#comments-to-multiple-types-of-models)\n  feature. (defaults to true)\n- `camel_case` - if set to true this will make serialization, reference paths\n  and virtual properties use camel case, instead of snake case.\n- `serialize` - if set to false disables the [serialization feature](#serialization)\n- `query` - if set to false disables the [query feature](#query)\n\n## Testing\nTests may be run with: `grunt test`.\n\n## License\nCopyright (c) 2014 Pedro Tacla Yamada. Licensed under the MIT license.\nPlease refer to the [LICENSE](LICENSE) file for more info.\n","maintainers":[{"name":"yamadapc","email":"tacla.yamada@gmail.com"}],"time":{"modified":"2022-06-20T06:58:10.371Z","created":"2014-02-25T20:40:52.832Z","1.0.0":"2014-02-25T20:40:52.832Z","1.1.0":"2014-02-25T21:04:16.540Z","1.1.1":"2014-02-26T19:25:43.552Z","1.1.2":"2014-02-28T19:25:50.867Z","1.1.3":"2014-03-05T21:10:26.833Z","1.2.0":"2014-03-14T04:01:18.973Z","1.3.0":"2014-03-14T04:02:07.291Z","1.3.1":"2014-03-14T04:13:22.041Z","1.4.0":"2014-03-17T21:02:39.444Z","1.4.1":"2014-03-17T21:06:20.383Z","1.4.2":"2014-04-18T23:23:54.319Z","1.5.0":"2014-04-18T23:25:12.281Z","1.6.0":"2014-04-19T00:45:26.776Z","2.0.0":"2014-04-19T01:06:25.700Z","2.0.1":"2014-04-30T15:47:12.554Z","2.1.0":"2014-05-03T23:45:04.193Z","2.1.1":"2014-05-21T22:29:20.875Z","2.1.2":"2014-07-16T13:05:03.654Z","2.1.3":"2014-07-16T14:31:13.090Z"},"homepage":"https://github.com/yamadapc/mongoose-context-ref","repository":{"type":"git","url":"https://github.com/yamadapc/mongoose-context-ref"},"author":{"name":"Pedro Tacla Yamada","email":"tacla.yamada@gmail.com","url":"github.com/yamadapc"},"bugs":{"url":"https://github.com/yamadapc/mongoose-context-ref/issues"},"readmeFilename":"README.md","keywords":["mongoose","context","references","relations"]}