{"_id":"gizmo","_rev":"11-ff72e78ea3ecb50a4f597e5cbb433b9d","name":"gizmo","description":"Simple Javascript object system","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.2":{"name":"gizmo","description":"Simple Javascript object system","version":"1.0.2","author":{"name":"Matt Eberts","email":"downturn@gmail.com"},"dependencies":{"vows":"~0.5.6"},"directories":{"lib":"./lib"},"repositories":[{"type":"git","url":"http://github.com/zoips/Gizmo.git"}],"homepage":"http://github.com/zoips/Gizmo","main":"./index.js","engines":{"node":">= 0.2.0"},"_id":"gizmo@1.0.2","_engineSupported":true,"_npmVersion":"0.3.14","_nodeVersion":"v0.4.0","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"f30b145219e735c255b9553750313da285206f86","tarball":"https://registry.npmjs.org/gizmo/-/gizmo-1.0.2.tgz","integrity":"sha512-7aaBQMrCI4Z056Ki8T8VOGURieXDusxDNY/jk3rgYHbZzWXNDDaD5XQDjZ/Kq/nSOXcibw5yZgo1pEFdLNCIRA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSwHrncYgHhMGm9baWe6v1dMg1dc6PTkwXCwb2tS34BAIhAO8ug2RFtefAu1IQsgTAhFuQftAmngH8Ce9Gbu8l5pd/"}]}},"1.1.0":{"name":"gizmo","description":"Simple Javascript object system","version":"1.1.0","author":{"name":"Matt Eberts","email":"downturn@gmail.com"},"dependencies":{"vows":"~0.5.6","node-proxy":"~0.4.0"},"directories":{"lib":"./lib"},"repositories":[{"type":"git","url":"git://github.com/zoips/Gizmo.git"}],"homepage":"http://github.com/zoips/Gizmo","main":"./index.js","engines":{"node":">= 0.2.0"},"_id":"gizmo@1.1.0","_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.6","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"de54031d5bfd914b94a366c6bcd42aac7c088a8e","tarball":"https://registry.npmjs.org/gizmo/-/gizmo-1.1.0.tgz","integrity":"sha512-0rGuOrbTzlWOxoIN45uGaryQ7O7qvL5xrgmzfAlOoNNxlyQjirGUlC9/hFFHMCYSFkJ+ddA4cfpsya7ewcL6FA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDv0ykqSEWtUBnD5gIJL4fVTIosa200I+wCMj0unFoRvgIhANOrty2EMHXUREO4vjj+7FOB7UoD9ix4ZYn0K/wYSoZz"}]}},"2.0.0":{"name":"gizmo","description":"Simple Javascript object system","version":"2.0.0","author":{"name":"Matt Eberts","email":"downturn@gmail.com"},"dependencies":{"vows":"~0.5.6"},"directories":{"lib":"./lib"},"repositories":[{"type":"git","url":"git://github.com/zoips/Gizmo.git"}],"homepage":"http://github.com/zoips/Gizmo","main":"./index.js","engines":{"node":">= 0.10.0"},"readme":"Gizmo\n=====\n\nWhat is Gizmo?\n--------------\n\nGizmo is a simple object system for Javascript. It provides an easy way to\ncreate objects via mixing and provides a mechanism for sharing protected data\nup and down the inheritance tree. This allows you to create \"classes\" with the\nfull range of encapsulation: public, protected, and private.\n\nWith Harmony Proxies (use --harmony), Gizmo adds dynamic prototype support similar\nto SELF and io. You can create trees of prototypes to enable dynamic mixin capabilities.\n\nAPI\n---\n\n### Gizmo.define\n\nGizmo.define(cons : Function) : Function\nGizmo.define(parentCons : Function ..., cons : Function) : Function\n\nDefines a Gizmo constructor. cons is the constructor function that will\nconstruct the object. parentCons are any Gizmo constructor functions that\nare the parents. The constructor returned can be instantiated via the new operator like a normal Javascript constructor\nfunction, or it can be passed to Gizmo.create in order to add prototype support.\n\n#### Example\n\n    var sys = require(\"sys\");\n    var Gizmo = require(\"gizmo\");\n\n    var TheParent = Gizmo.define(function(our, foo) {\n      var bar = \"some text\"; // this is private to this instance\n\n      our.foo = foo; // this is protected and shared with children\n\n      // this is a public method. our.self is a reference to the correct 'this'\n      // object\n      our.self.doFoo = function() {\n        sys.log(our.foo + \": \" + bar);\n      };\n\n      // this is a protected method\n      our.doBar = function() {\n        sys.log(bar);\n      };\n    });\n\n    var TheChild = Gizmo.define(TheParent, function(our, parent, someVar) {\n      parent(someVar); // run the parent constructor.\n\n      our.self.doFoo(); // call doFoo defined by the parent\n      our.doBar(); // call doBar in the protected object\n    });\n\n    var c = new TheChild(\"this is the value for someVar\");\n\n    c.doFoo();\n\n### Gizmo.create\n\nGizmo.create(cons : Function, args... : Object) : Object\n\nTakes a constructor function, either created by Gizmo.define or a normal Javascript constructor function. This will\nconstruct an object with prototype support using the constructor function and arguments.\n\n#### Example\n\nComing soon?! Check the test-create.js test\n\nLicense\n-------\n\nCopyright (c) 2011 Matt Eberts\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","readmeFilename":"README.md","repository":"[Circular ~.repositories.0]","bugs":{"url":"https://github.com/zoips/Gizmo/issues"},"_id":"gizmo@2.0.0","dist":{"shasum":"f10cea53d75330343f060e84d66200c6b7704a15","tarball":"https://registry.npmjs.org/gizmo/-/gizmo-2.0.0.tgz","integrity":"sha512-bXvJQ7TRKFVJ2eCHAJUQHksz+NVKDbVynOGs94palgJN6SOISCqngaOeJm91qF7gFfbhhkaQ34FIfc4/GvQdYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKVoDZbUDjrLAiO4rmnd3uO6XGZwk6akXSp64FXuNVTQIhALR6smJCWGvsruvcPI0+kfZ63BgYYeu/XKH49ntJrN1b"}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"zoips","email":"downturn@gmail.com"},"maintainers":[{"name":"zoips","email":"downturn@gmail.com"}]},"2.0.1":{"name":"gizmo","description":"Simple Javascript object system","version":"2.0.1","author":{"name":"Matt Eberts","email":"downturn@gmail.com"},"dependencies":{"vows":"~0.5.6"},"directories":{"lib":"./lib"},"repositories":[{"type":"git","url":"git://github.com/zoips/Gizmo.git"}],"homepage":"http://github.com/zoips/Gizmo","main":"./index.js","engines":{"node":">= 0.10.0"},"readme":"Gizmo\n=====\n\nWhat is Gizmo?\n--------------\n\nGizmo is a simple object system for Javascript. It provides an easy way to\ncreate objects via mixing and provides a mechanism for sharing protected data\nup and down the inheritance tree. This allows you to create \"classes\" with the\nfull range of encapsulation: public, protected, and private.\n\nWith Harmony Proxies (use --harmony), Gizmo adds dynamic prototype support similar\nto SELF and io. You can create trees of prototypes to enable dynamic mixin capabilities.\n\nAPI\n---\n\n### Gizmo.define\n\nGizmo.define(cons : Function) : Function\nGizmo.define(parentCons : Function ..., cons : Function) : Function\n\nDefines a Gizmo constructor. cons is the constructor function that will\nconstruct the object. parentCons are any Gizmo constructor functions that\nare the parents. The constructor returned can be instantiated via the new operator like a normal Javascript constructor\nfunction, or it can be passed to Gizmo.create in order to add prototype support.\n\n#### Example\n\n    var sys = require(\"sys\");\n    var Gizmo = require(\"gizmo\");\n\n    var TheParent = Gizmo.define(function(our, foo) {\n      var bar = \"some text\"; // this is private to this instance\n\n      our.foo = foo; // this is protected and shared with children\n\n      // this is a public method. our.self is a reference to the correct 'this'\n      // object\n      our.self.doFoo = function() {\n        sys.log(our.foo + \": \" + bar);\n      };\n\n      // this is a protected method\n      our.doBar = function() {\n        sys.log(bar);\n      };\n    });\n\n    var TheChild = Gizmo.define(TheParent, function(our, parent, someVar) {\n      parent(someVar); // run the parent constructor.\n\n      our.self.doFoo(); // call doFoo defined by the parent\n      our.doBar(); // call doBar in the protected object\n    });\n\n    var c = new TheChild(\"this is the value for someVar\");\n\n    c.doFoo();\n\n### Gizmo.create\n\nGizmo.create(cons : Function, args... : Object) : Object\n\nTakes a constructor function, either created by Gizmo.define or a normal Javascript constructor function. This will\nconstruct an object with prototype support using the constructor function and arguments.\n\n#### Example\n\nComing soon?! Check the test-create.js test\n\nLicense\n-------\n\nCopyright (c) 2011 Matt Eberts\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","readmeFilename":"README.md","repository":"[Circular ~.repositories.0]","bugs":{"url":"https://github.com/zoips/Gizmo/issues"},"_id":"gizmo@2.0.1","dist":{"shasum":"1274c7fa425b73e45e584519c582287473587b6e","tarball":"https://registry.npmjs.org/gizmo/-/gizmo-2.0.1.tgz","integrity":"sha512-hEQfpLzIVq4UnvRRndStp4o8I1/2llg1HFOSU6aaKJT3tSG4TK8dstwe7uMr7TprUgFgogyzxhCh+ZixRygNGg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJnkt34TCDhLbd1h9WTe4B2iNJJQeSq/HIXX6CvIbazQIgHdGhZDm5Mhn2bB/bYi2rOALBkkF7ACspcAD6Ww+YTK0="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"zoips","email":"downturn@gmail.com"},"maintainers":[{"name":"zoips","email":"downturn@gmail.com"}]}},"maintainers":[{"name":"zoips","email":"downturn@gmail.com"}],"time":{"modified":"2022-06-18T12:42:40.996Z","created":"2011-03-11T04:43:12.018Z","1.0.2":"2011-03-11T04:43:12.424Z","1.1.0":"2011-05-27T04:42:23.703Z","2.0.0":"2013-10-20T21:59:29.138Z","2.0.1":"2013-10-20T22:39:13.583Z"},"author":{"name":"Matt Eberts","email":"downturn@gmail.com"},"repository":"[Circular ~.repositories.0]"}