{"_id":"@bluelovers/extend-bases","_rev":"3-89cfaebc89b46bfa0411052a4d968934","name":"@bluelovers/extend-bases","dist-tags":{"latest":"2.0.2"},"versions":{"1.0.3":{"name":"@bluelovers/extend-bases","version":"1.0.3","private":false,"description":"A simple library for multiple inheritance in JavaScript.","keywords":["ts","typescript","inheritance","multiple inheritance","multiple-inheritance","class","klass","oop","object oriented","object-oriented","inherits","extend","bases","extends"],"homepage":"https://github.com/bluelovers/extend-bases#readme","bugs":{"url":"https://github.com/bluelovers/extend-bases/issues"},"repository":{"type":"git","url":"git+https://github.com/bluelovers/extend-bases.git"},"license":"MIT","author":{"name":"aryan.programer@gmail.com"},"main":"index.js","directories":{"test":"test"},"scripts":{"lint":"yarn tslint index.ts","lint:fix":"yarn tslint index.ts --fix","test":"yarn jest","npm:publish":"npm publish","npm:publish:bump":"yarn-tool version && npm publish","preversion":"echo preversion && yarn run test","prepublishOnly":"yarn run preversion","prepublishOnly:check-bin":"ynpx --quiet @yarn-tool/check-pkg-bin","prepublishOnly:update":"yarn run ncu && yarn run sort-package-json","postpublish":"yarn run postpublish:changelog && yarn run postpublish:git:commit && yarn run postpublish:git:tag && yarn run postpublish:git:push","postpublish:changelog":"ynpx --quiet @yarn-tool/changelog && git add ./CHANGELOG.md","postpublish:git:commit":"git commit -m \"chore(release): publish\" . & echo postpublish:git:commit","postpublish:git:push":"git push --follow-tags","postpublish:git:tag":"ynpx --quiet @yarn-tool/tag","ncu":"yarn-tool ncu -u","sort-package-json":"yarn-tool sort","tsc:showConfig":"ynpx get-current-tsconfig -p"},"dependencies":{"array.prototype.flatmap":"^1.2.4","class-without-call-parent-constructor":"^2.0.4","reflect.ownkeys":"^1.0.2","tslib":"^2.3.1"},"devDependencies":{"@bluelovers/tsconfig":"^1.0.25","@types/jest":"^27.0.1","jest":"^27.0.6","ts-jest":"^27.0.4","tslint":"^6.1.3"},"publishConfig":{"access":"public"},"gitHead":"46244c4ac7e3f9f709f0f02f4715453dda2da851","_id":"@bluelovers/extend-bases@1.0.3","_nodeVersion":"16.6.2","_npmVersion":"7.20.5","dist":{"integrity":"sha512-GO0yG6HdwgYfrCaGi81GXGEjCVnKlLaOkI63tg6fW7sPC4LlL8QNwo5Z4QEmoLE0FAJaSt1NpMK6S4Rdxjko+A==","shasum":"19997a422c4a4852e12392d692469472d20d1458","tarball":"https://registry.npmjs.org/@bluelovers/extend-bases/-/extend-bases-1.0.3.tgz","fileCount":5,"unpackedSize":40362,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGV0rCRA9TVsSAnZWagAAvz0P/jmN3IwCgzrmiUdUqIiH\njr1aDqYBLa599B1uO+KlaeQfMbgnu9g0mneEOlmbDeGJ+O8wQBTRDC5huyld\nqW9MM1sqL6HTXFXGXp9js61mEXp0q5BbbbG8vskGrhlPml9PYGZ+k3wqq1l8\nq22XpXIZtiMJn24jC2lOPQait2tUVgGNMwzSuEFTCSZ1I03E2PB8BDufYi7Y\nWISsQYH4nEdsA6sXf5jdsqL0vWYqZC09d1zqtdw1W6Em39D8h/oWP92Oi0UC\neCyPpUyl+ewbJRPtyi8VmCgRCzPn3Avu1V69z0vXNnwMNn/eidq7ynINIf6B\newdqyRLEs7XPkTc5t86FeSi9oxk9Q9SIICUt7NZV07filWCjrXF4ETscD+cj\npeM6EklH0k2+0M0VMQpe/TVszirUjd28f1SzreWUTL8NjjZlYxFknHfkkAoF\nc/YJ/1elGiH8qj76oIoOfoly7zzNsbG9XErqxxU5g1cGs/LkF+J4jg7LXkbq\nteND6ozgyQ2ytPEkgm71mYE2hMyastDGsmhV0rnxeDcVqsbxtj9KC6O6cez3\nAWlMGKtFrkGDuBG2aTZzyUtBEX0YAZvhWo0cccnUz92MDdfdGHnOaoC9tggH\nIkpmhCEdEJEnDInDhG8p7+EjWNLQN5cnhFgSmMIr3idunYX5A6cUV+71SThj\nWF/C\r\n=b9l8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDImi20Z0tlj0HoNZPj2kHv9TQ2p0jx4xANSgEFxgBhvAiEAgBdZ0JxcbrzX/XwaSsBxXTpnsHPM47tTwGR0+08NT6U="}]},"_npmUser":{"name":"bluelovers","email":"codelovers@users.sourceforge.net"},"maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/extend-bases_1.0.3_1629052202998_0.49530881179309905"},"_hasShrinkwrap":false},"2.0.1":{"name":"@bluelovers/extend-bases","version":"2.0.1","private":false,"description":"A simple library for multiple inheritance in JavaScript.","keywords":["ts","typescript","inheritance","multiple inheritance","multiple-inheritance","class","klass","oop","object oriented","object-oriented","inherits","extend","bases","extends","create-by-yarn-tool","create-by-tsdx"],"homepage":"https://github.com/bluelovers/extend-bases#readme","bugs":{"url":"https://github.com/bluelovers/extend-bases/issues"},"repository":{"type":"git","url":"git+https://github.com/bluelovers/extend-bases.git"},"license":"MIT","author":{"name":"aryan.programer@gmail.com"},"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./src/*":"./src/*"},"main":"dist/index.cjs","unpkg":"dist/index.umd.production.min.cjs","module":"dist/index.esm.mjs","types":"dist/index.d.ts","typings":"dist/index.d.ts","directories":{"test":"test"},"scripts":{"pretest":"echo pretest","test":"jest --passWithNoTests","test:jest":"jest --passWithNoTests","test:jest:clearCache":"jest --clearCache","test:jest:snapshot":"yarn run test:jest -- -u","test:snapshot":"yarn run test -- -u","posttest":"yarn run build","install:frozenLockfile":"yarn-tool install --frozen-lockfile","install:resetLockfile":"yarn-tool install --reset-lockfile","build":"yarn run build:tsdx && yarn run build:dts:bundle","build:dts:bundle":"ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle","build:dts:copy":"copy .\\src\\index.d.ts .\\dist\\index.d.ts & echo build:dts","build:dts:tsc":"yarn run build:dts:tsc:emit && yarn run build:dts:copy","build:dts:tsc:emit":"tsc --emitDeclarationOnly --declaration --noEmit false","build:tsdx":"ynpx @bluelovers/tsdx build --target node","ci:install":"yarn install --frozen-lockfile && yarn add -W typescript@next jest ts-jest ts-node ynpx lerna yarn-tool","ci:build":"echo ci:build","npm:publish":"npm publish","npm:publish:bump":"yarn run version:bump && npm publish","preversion":"echo preversion && yarn run test","version":"echo version","version:bump":"yarn-tool version","postversion":"echo postversion","prepublish":"echo prepublish","prepare":"echo prepare","prepublishOnly":"yarn run preversion","prepublishOnly:check-bin":"ynpx --quiet @yarn-tool/check-pkg-bin","prepublishOnly:update":"yarn run ncu && yarn run sort-package-json","prepack":"echo prepack","pack":"echo pack","postpack":"echo postpack","publish":"echo publish","postpublish":"yarn run postpublish:changelog && yarn run postpublish:git:commit && yarn run postpublish:git:tag && yarn run postpublish:git:push","postpublish:changelog":"ynpx --quiet @yarn-tool/changelog && git add ./CHANGELOG.md","postpublish:git:commit":"git commit -m \"chore(release): publish\" . & echo postpublish:git:commit","postpublish:git:push":"git push --follow-tags","postpublish:git:tag":"ynpx --quiet @yarn-tool/tag","postpublishOnly":"echo postpublishOnly","ncu":"yarn-tool ncu -u","sort-package-json":"yarn-tool sort","tsc:showConfig":"ynpx get-current-tsconfig -p"},"dependencies":{"array.prototype.flatmap":"^1.3.0","class-without-call-parent-constructor":"^2.0.5","reflect.ownkeys":"^1.1.0"},"devDependencies":{"@bluelovers/tsconfig":"^1.0.30","@types/array.prototype.flatmap":"^1.2.2","@types/jest":"^29.0.0","es6-class-prototype":"^1.0.4","tslib":">=2"},"packageManager":"yarn@1.22.19","publishConfig":{"access":"public"},"gitHead":"c04ed179d15f243a22985030a97f3a412ae41c25","_id":"@bluelovers/extend-bases@2.0.1","_nodeVersion":"18.7.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-bbDzpIPELaJXAhs5YKFYIkGPV9UdnrO6qXJFwdz7F3cpG7+3Pz8bZ9DMhiHNS8DlYzq9nra/e0qoXeU/SJ5MTw==","shasum":"508a803c76317c6e7a82ebcf3d3adeb4c629a765","tarball":"https://registry.npmjs.org/@bluelovers/extend-bases/-/extend-bases-2.0.1.tgz","fileCount":17,"unpackedSize":137744,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4KRxVY/uGYxWFM72SCLwtMn5MA70RKdElcplsG8KYjwIgZ30R8UTqUuCL7HIfbvRUDPxZlUrzNFBt5ikmj4sfBHY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDnYkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRDQ//azHU6x0gRnixZVgThVlvKoV5JU+uE04/hUTsvOeQWYndsGX0\r\n3UYv/5fslxjFX1qlYWUcMK3jzY4R3U9irF9fcdaXmZVEMPY4dvQydVbRdkDm\r\nJQMZYlnt//XGpwLSDnr92i72bDxvTGg4TKQD9/LtuV6vbsVxii2bjhvcDjrG\r\ncvu8W1oFUYRTGbuyeXN6OzmA98j8WCbjiUwqo5tnRjxOtHdb5qvOgTN0XKvg\r\nQLmjFUsoqsg4RmyyhrfsmOL5cVq9d6Upihqa0XOgxOCkYsVRC8pleqksDFfb\r\n4gkSMZxjAwfEiR2+YWajrJBKvVO57W8/ehKlFaPsFcVS/JOzmlkpRcKbeZdH\r\nl4dpJKbKxrBgyOPrDIFIQFctrHa2W+LVUMNtPZ41jZlG9+TjvLqhIl31webd\r\nuODPPZIWJoo4uCe+BRfqkPBYTOcn8BDczNlZmV9EZwEbQ+B5JQ0ubF2pQjC0\r\noWa+LAJXhCkk94C/Xc1Vm5Fj5elQicF6T+EkmvBQLJYyq0oIrCOGLG/uBzS/\r\nsM+M3hfU80Ve60wy1iIvQef3/KQaaQYkdc5shLJgBX0xwOs53fc97v1puFF/\r\nqzLO7JntAivTBnqGmlW7I0eMS1joU5l8eTNbsGS0MlxWM2mrMgllv+B0gabj\r\n1gxy41sOIX5uQzb+TfIFwfmW6YvdUcb1qns=\r\n=zuX3\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bluelovers","email":"codelovers@users.sourceforge.net"},"maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/extend-bases_2.0.1_1661892132376_0.04683961261448255"},"_hasShrinkwrap":false},"2.0.2":{"name":"@bluelovers/extend-bases","version":"2.0.2","private":false,"description":"A simple library for multiple inheritance in JavaScript.","keywords":["ts","typescript","inheritance","multiple inheritance","multiple-inheritance","class","klass","oop","object oriented","object-oriented","inherits","extend","bases","extends","create-by-yarn-tool","create-by-tsdx"],"homepage":"https://github.com/bluelovers/extend-bases#readme","bugs":{"url":"https://github.com/bluelovers/extend-bases/issues"},"repository":{"type":"git","url":"git+https://github.com/bluelovers/extend-bases.git"},"license":"MIT","author":{"name":"aryan.programer@gmail.com"},"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./src/*":"./src/*"},"main":"dist/index.cjs","unpkg":"dist/index.umd.production.min.cjs","module":"dist/index.esm.mjs","types":"dist/index.d.ts","typings":"dist/index.d.ts","directories":{"test":"test"},"scripts":{"pretest":"echo pretest","test":"jest --passWithNoTests","test:jest":"jest --passWithNoTests","test:jest:clearCache":"jest --clearCache","test:jest:snapshot":"yarn run test:jest -- -u","test:snapshot":"yarn run test -- -u","posttest":"yarn run build","install:frozenLockfile":"yarn-tool install --frozen-lockfile","install:resetLockfile":"yarn-tool install --reset-lockfile","build":"yarn run build:tsdx && yarn run build:dts:bundle","build:dts:bundle":"ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle","build:dts:copy":"copy .\\src\\index.d.ts .\\dist\\index.d.ts & echo build:dts","build:dts:tsc":"yarn run build:dts:tsc:emit && yarn run build:dts:copy","build:dts:tsc:emit":"tsc --emitDeclarationOnly --declaration --noEmit false","build:tsdx":"ynpx @bluelovers/tsdx build --target node","ci:install":"yarn install --frozen-lockfile && yarn add -W typescript@next jest ts-jest ts-node ynpx lerna yarn-tool","ci:build":"echo ci:build","npm:publish":"npm publish","npm:publish:bump":"yarn run version:bump && npm publish","preversion":"echo preversion && yarn run test","version":"echo version","version:bump":"yarn-tool version","postversion":"echo postversion","prepublish":"echo prepublish","prepare":"echo prepare","prepublishOnly":"yarn run preversion","prepublishOnly:check-bin":"ynpx --quiet @yarn-tool/check-pkg-bin","prepublishOnly:update":"yarn run ncu && yarn run sort-package-json","prepack":"echo prepack","pack":"echo pack","postpack":"echo postpack","publish":"echo publish","postpublish":"yarn run postpublish:changelog && yarn run postpublish:git:commit && yarn run postpublish:git:tag && yarn run postpublish:git:push","postpublish:changelog":"ynpx --quiet @yarn-tool/changelog && git add ./CHANGELOG.md","postpublish:git:commit":"git commit -m \"chore(release): publish\" . & echo postpublish:git:commit","postpublish:git:push":"git push --follow-tags","postpublish:git:tag":"ynpx --quiet @yarn-tool/tag","postpublishOnly":"echo postpublishOnly","ncu":"yarn-tool ncu -u","sort-package-json":"yarn-tool sort","tsc:showConfig":"ynpx get-current-tsconfig -p"},"dependencies":{"array.prototype.flatmap":"^1.3.0","class-without-call-parent-constructor":"^2.0.5","reflect.ownkeys":"^1.1.0"},"devDependencies":{"@bluelovers/tsconfig":"^1.0.30","@types/array.prototype.flatmap":"^1.2.2","@types/jest":"^29.0.0","es6-class-prototype":"^1.0.4","tslib":">=2"},"packageManager":"yarn@1.22.19","publishConfig":{"access":"public"},"gitHead":"1578d0823ff2c8b3a26ce255812d73d2e17ac425","_id":"@bluelovers/extend-bases@2.0.2","_nodeVersion":"18.7.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-QbZ14A4VsmumNHgyi8GcoV30CcCSNzzjrEFnOxIyZkYZwp5TOY7cgt4NFO2Moq0XJNbZMyBMKK8ozkle5UpM1g==","shasum":"7df57c523c3a216007a794a8da9155f19e68a74f","tarball":"https://registry.npmjs.org/@bluelovers/extend-bases/-/extend-bases-2.0.2.tgz","fileCount":17,"unpackedSize":137973,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBiVpndCTUunDlfosUMuQDY6V4ST2qzhjAS1AeGUTNTqAiAI+qDINsQs6+4TJBCKBknBQAYfj5ybcVN62h7DEBdDPg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDozKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoitBAAh5NG+dJDUidyUC+g83zRV4z1jz1JJHMF0DmGXMnbfXhR172f\r\ndXF7YyGUQGKwf0by14aD4j2LQa45pAWArKFAINqYavdJZAkINRKmMwggNp0I\r\neqHeRRwGTHCG7AbR4GzOxj0EEDGvmPJg1xlzeOUQ4QxRn74raNYH4WqhNuwk\r\n5qeoZZm3utdALoiuo2WS2i/jwdZ/p5HLexk648or+iik7kCfqqKtB9x/59fM\r\n40/4oxp2R4/G7qJzZUP8GzQ4BJAuaQCSWGXZJC2+OIIw5F+RYtZV/00RAoor\r\nE9oPjtCPvJiYk7Yxx4IsVLzufhS86EXtrRp+GZGmwqtVhW+WrA3B7HzaHwqh\r\nuvFHhE0lom2wE/NCUA//1R80sb05O0HttcJUUKMa1ZBrrTwJ/e3Xc7d0acGY\r\ndTxDs0fTeJS7dhe/c3DPgK4txleHhLWFn9CbaFiBw+W6acKIr/V+KjdvgABY\r\nesefdp76TSBlQJWeWXkJ4W7gRaarjRTlJGMUsG2YnVQp3HjqUA0XaPLPskTg\r\nR6wBp3F+RUW8ueudeJZeVOHPi2HtAtbGT7L/qjSljjfo0Vvq2wiVO85b78wQ\r\n/hLwJ9LF90n6WxkHcpNr9hfKHc8nErVlWbBDRXRCgkBvottCokTgb8M5M6IJ\r\ntLnk9VN97qor1siNR5BzGd6cwgVUBWiRUwQ=\r\n=XML1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bluelovers","email":"codelovers@users.sourceforge.net"},"maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/extend-bases_2.0.2_1661897929942_0.9392654131038722"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-15T18:30:02.934Z","1.0.3":"2021-08-15T18:30:03.202Z","modified":"2022-08-30T22:18:50.191Z","2.0.1":"2022-08-30T20:42:12.532Z","2.0.2":"2022-08-30T22:18:50.122Z"},"maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"description":"A simple library for multiple inheritance in JavaScript.","homepage":"https://github.com/bluelovers/extend-bases#readme","keywords":["ts","typescript","inheritance","multiple inheritance","multiple-inheritance","class","klass","oop","object oriented","object-oriented","inherits","extend","bases","extends","create-by-yarn-tool","create-by-tsdx"],"repository":{"type":"git","url":"git+https://github.com/bluelovers/extend-bases.git"},"author":{"name":"aryan.programer@gmail.com"},"bugs":{"url":"https://github.com/bluelovers/extend-bases/issues"},"license":"MIT","readme":"# extend-bases: A simple library for multiple inheritance in JavaScript.\n\nThis library can be used to achieve multiple inheritance in JavaScript, but it sets itself apart from other libraries for multiple inheritance because it isolates the base classes and prevents the properties and methods from colliding, while still allowing easy access to the properties and methods of the base classes.\n\n## Installation\n\nSimply run:\n\n```\nnpm add extend-bases\n```\n\nOr:\n\n```\nyarn add extend-bases\n```\n\nTo import:\n\n```typescript\nimport {bases, defineProperties, isInstanceOf} from \"extend-bases\";\n```\n\nOr:\n\n```typescript\nconst {bases, defineProperties, isInstanceOf} = require(\"extend-bases\");\n```\n\n## Getting started\n\nTo inherit from multiple bases simply extend from `bases(Class1, Class2, ...)`. In the constructor pass the <b>*instances*</b> of the classes to the `super` constructor.\n\nThen you can access the base properties and methods directly from `this.`, the first class with that property or method will be given precedence. \n\nTo access a particular base use `this.bases[index]`.\n\nReplace all instances of `v instanceof Class` with `isInstanceOf(v, Class)`, it’s just that simple.\n\n## For more details\n\n- Read the [Handy manual](https://github.com/aryan-programmer/extend-bases/wiki/Handy-Manual), it’s very simple & small and gives enough information to get started.\n- Then read the [Documentation](https://github.com/aryan-programmer/extend-bases/wiki/Documentation). it’s not too big and easy to go through.\n- Then, if you have enough time or are interested, read the tests and source code of the project.\n\n## Implementation details\n\nThis library uses Proxies, so sadly no IE11 support, but otherwise this library also imports es-shims for `Reflect.ownKeys`(ES6 but used very often and an es-shim exists for it) and `Array.prototype.flatMap`(ES2019, very new), which were found to be the bottlenecks, for some browsers.\n\nThis library uses proxies for easy access in the class instances, and it merges the prototypes of the base classes, but for isolation of base classes it creates a new function wrapping the method call. It’s just best to look at the source code for this.\n\n## TypeScript support\n\nThe library is by default written in TypeScript, which you all should be using if you aren’t, for great code completion. The details of the TypeScript definitions are a bit fiddly, so it’s best not to worry about them, they work<small>, or you can just look at the source code</small>.\n\n## Contributing\n\nFeel free to open a pull request, fix bugs, or read the source code. It’s all up to you.","readmeFilename":"README.md"}