{"_id":"obso","_rev":"69288","name":"obso","description":"Make an object observable.","dist-tags":{"latest":"0.7.0"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"time":{"modified":"2021-06-03T10:22:56.000Z","created":"2018-02-09T17:13:35.309Z","0.7.0":"2021-03-20T21:39:16.858Z","0.6.0":"2020-05-01T17:06:09.896Z","0.5.1":"2019-11-15T10:39:16.942Z","0.5.0":"2019-09-04T14:47:16.993Z","0.4.3":"2019-01-26T23:40:37.073Z","0.4.2":"2018-12-26T22:38:42.993Z","0.4.1":"2018-12-26T22:36:40.780Z","0.4.0":"2018-12-24T19:07:37.844Z","0.3.0":"2018-07-25T20:29:53.641Z","0.2.0":"2018-05-29T22:09:03.652Z","0.1.0":"2018-02-09T17:13:35.309Z"},"users":{},"author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/75lb/obso.git"},"versions":{"0.7.0":{"name":"obso","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.7.0","repository":{"type":"git","url":"git+https://github.com/75lb/obso.git"},"description":"Make an object observable.","main":"dist/index.js","module":"index.mjs","engines":{"node":">=14"},"devDependencies":{"jsdoc-to-markdown":"^7.0.0","rollup":"^2.42.1","test-runner":"^0.8.14"},"scripts":{"test":"npm run dist && test-runner test.mjs","dist":"rollup -f umd -n Emitter -o dist/index.js index.mjs","docs":"jsdoc2md -c jsdoc.conf -t README.hbs index.mjs > README.md"},"license":"MIT","gitHead":"8220f277463e94c44211c41385423e00e636b7cd","bugs":{"url":"https://github.com/75lb/obso/issues"},"homepage":"https://github.com/75lb/obso#readme","_id":"obso@0.7.0","_nodeVersion":"15.12.0","_npmVersion":"7.6.3","dist":{"shasum":"92a0e7d6963c0420ba2d2e5996a4bffae2899594","size":3739,"noattachment":false,"key":"/obso/-/obso-0.7.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/obso/download/obso-0.7.0.tgz"},"_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"directories":{},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/obso_0.7.0_1616276356687_0.8654704292267195"},"_hasShrinkwrap":false,"publish_time":1616276356858,"_cnpm_publish_time":1616276356858},"0.6.0":{"name":"obso","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.6.0","repository":{"type":"git","url":"git+https://github.com/75lb/obso.git"},"description":"Make an object observable.","main":"dist/index.js","module":"index.mjs","engines":{"node":">=8"},"dependencies":{},"devDependencies":{"jsdoc-to-markdown":"^5.0.3","rollup":"^2.7.6","test-runner":"^0.8.13"},"scripts":{"test":"npm run dist && test-runner test.js","dist":"rollup -f umd -n Emitter -o dist/index.js index.mjs","docs":"jsdoc2md -c jsdoc.conf -t README.hbs index.mjs > README.md"},"license":"MIT","gitHead":"a18fc2097030c9eb4f159273cdb6aa6ec32d530f","bugs":{"url":"https://github.com/75lb/obso/issues"},"homepage":"https://github.com/75lb/obso#readme","_id":"obso@0.6.0","_nodeVersion":"14.1.0","_npmVersion":"6.14.4","dist":{"shasum":"26d398017d0e9977e44936e52208ed1f4cd65ff9","size":3484,"noattachment":false,"key":"/obso/-/obso-0.6.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/obso/download/obso-0.6.0.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/obso_0.6.0_1588352769791_0.6663048853505997"},"_hasShrinkwrap":false,"publish_time":1588352769896,"_cnpm_publish_time":1588352769896},"0.5.1":{"name":"obso","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.5.1","repository":{"type":"git","url":"git+https://github.com/75lb/obso.git"},"description":"obso","main":"dist/index.js","module":"index.mjs","engines":{"node":">=8"},"dependencies":{},"devDependencies":{"jsdoc-to-markdown":"^5.0.2","rollup":"^1.27.0","test-runner":"^0.7.6"},"scripts":{"test":"npm run dist && test-runner test.js","dist":"rollup -f umd -n Emitter -o dist/index.js index.mjs","docs":"jsdoc2md -c jsdoc.conf -t README.hbs index.mjs > README.md"},"license":"MIT","gitHead":"a97d67f98a2fcdb98bf846541ab70e3581e76be1","bugs":{"url":"https://github.com/75lb/obso/issues"},"homepage":"https://github.com/75lb/obso#readme","_id":"obso@0.5.1","_nodeVersion":"12.12.0","_npmVersion":"6.13.0","dist":{"shasum":"e1a0be5feb6714cea64830c8b347160594ad5f77","size":3695,"noattachment":false,"key":"/obso/-/obso-0.5.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/obso/download/obso-0.5.1.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/obso_0.5.1_1573814356788_0.16537484083396614"},"_hasShrinkwrap":false,"publish_time":1573814356942,"_cnpm_publish_time":1573814356942},"0.5.0":{"name":"obso","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.5.0","repository":{"type":"git","url":"git+https://github.com/75lb/obso.git"},"description":"obso","main":"dist/index.js","engines":{"node":">=8"},"dependencies":{},"devDependencies":{"jsdoc-to-markdown":"^5.0.1","rollup":"^1.20.3","test-runner":"^0.6.0"},"scripts":{"test":"npm run dist && test-runner test.js","dist":"rollup -f umd -n Emitter -o dist/index.js index.mjs","docs":"jsdoc2md -c jsdoc.conf -t README.hbs index.mjs > README.md"},"license":"MIT","gitHead":"a014cd79b689b38db25a6e546d973edb9dabfdac","bugs":{"url":"https://github.com/75lb/obso/issues"},"homepage":"https://github.com/75lb/obso#readme","_id":"obso@0.5.0","_nodeVersion":"12.9.1","_npmVersion":"6.11.3","dist":{"shasum":"002c62f321a7f57567839f2cac552b833150742e","size":3684,"noattachment":false,"key":"/obso/-/obso-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/obso/download/obso-0.5.0.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/obso_0.5.0_1567608436889_0.4317296990792969"},"_hasShrinkwrap":false,"publish_time":1567608436993,"_cnpm_publish_time":1567608436993},"0.4.3":{"name":"obso","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.4.3","repository":{"type":"git","url":"git+https://github.com/75lb/obso.git"},"description":"obso","main":"dist/index.js","engines":{"node":">=6.0.0"},"dependencies":{},"devDependencies":{"jsdoc-to-markdown":"^4.0.1","rollup":"^0.68.2","test-runner":"^0.5.1","test-runner-counter":"^0.1.2"},"scripts":{"test":"rollup -c dist/index.config.js && test-runner test.js","dist":"rollup -c dist/index.config.js -w","docs":"jsdoc2md -c jsdoc.conf -t README.hbs index.mjs > README.md"},"license":"MIT","gitHead":"7ed86b63d264cf96b87d44ddb0e6e5640a8c691a","bugs":{"url":"https://github.com/75lb/obso/issues"},"homepage":"https://github.com/75lb/obso#readme","_id":"obso@0.4.3","_nodeVersion":"11.7.0","_npmVersion":"6.7.0","dist":{"shasum":"f7f0466ec0695b0940ddc092784f19bb23ec03a7","size":3640,"noattachment":false,"key":"/obso/-/obso-0.4.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/obso/download/obso-0.4.3.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/obso_0.4.3_1548546036956_0.8813471891328868"},"_hasShrinkwrap":false,"publish_time":1548546037073,"_cnpm_publish_time":1548546037073},"0.4.2":{"name":"obso","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.4.2","repository":{"type":"git","url":"git+https://github.com/75lb/obso.git"},"description":"obso","main":"dist/index.js","engines":{"node":">=6.0.0"},"dependencies":{},"devDependencies":{"jsdoc-to-markdown":"^4.0.1","rollup":"^0.68.2","test-runner":"^0.5.1","test-runner-counter":"^0.1.2"},"scripts":{"test":"rollup -c dist/index.config.js && test-runner test.js","dist":"rollup -c dist/index.config.js -w","docs":"jsdoc2md -c jsdoc.conf -t README.hbs index.mjs > README.md"},"license":"MIT","gitHead":"f98b35bd0d818294a12cf3c12a5684354ad84f7c","bugs":{"url":"https://github.com/75lb/obso/issues"},"homepage":"https://github.com/75lb/obso#readme","_id":"obso@0.4.2","_npmVersion":"6.5.0","_nodeVersion":"11.5.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"2e68a2e1934060ecfb0ddf9e2fa1482ac85e6aa1","size":2753,"noattachment":false,"key":"/obso/-/obso-0.4.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/obso/download/obso-0.4.2.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/obso_0.4.2_1545863922866_0.9237710822103904"},"_hasShrinkwrap":false,"publish_time":1545863922993,"_cnpm_publish_time":1545863922993},"0.4.1":{"name":"obso","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.4.1","repository":{"type":"git","url":"git+https://github.com/75lb/obso.git"},"description":"obso","main":"dist/index.js","engines":{"node":">=6.0.0"},"dependencies":{},"devDependencies":{"jsdoc-to-markdown":"^4.0.1","rollup":"^0.68.2","test-runner":"^0.5.1","test-runner-counter":"^0.1.2"},"scripts":{"test":"rollup -c dist/index.config.js && test-runner test.js","dist":"rollup -c dist/index.config.js -w","docs":"jsdoc2md -c jsdoc.conf -t README.hbs index.mjs > README.md"},"license":"MIT","gitHead":"90342924fc13c01b664e25044739651a96092bb6","bugs":{"url":"https://github.com/75lb/obso/issues"},"homepage":"https://github.com/75lb/obso#readme","_id":"obso@0.4.1","_npmVersion":"6.5.0","_nodeVersion":"11.5.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"7366b74ff076c3e8ab7410cb0b8c4cbd13d22d7c","size":3649,"noattachment":false,"key":"/obso/-/obso-0.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/obso/download/obso-0.4.1.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/obso_0.4.1_1545863800669_0.5822632321686889"},"_hasShrinkwrap":false,"publish_time":1545863800780,"_cnpm_publish_time":1545863800780},"0.4.0":{"name":"obso","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.4.0","repository":{"type":"git","url":"git+https://github.com/75lb/obso.git"},"description":"obso","main":"dist/index.js","engines":{"node":">=6.0.0"},"dependencies":{},"devDependencies":{"jsdoc-to-markdown":"^4.0.1","rollup":"^0.68.2","test-runner":"^0.5.1","test-runner-counter":"^0.1.2"},"scripts":{"test":"rollup -c dist/index.config.js && test-runner test.js","dist":"rollup -c dist/index.config.js -w","docs":"jsdoc2md -c jsdoc.conf -t README.hbs index.mjs > README.md"},"license":"MIT","gitHead":"863950d454a96a5bd2435883f49b1a9671af54bb","bugs":{"url":"https://github.com/75lb/obso/issues"},"homepage":"https://github.com/75lb/obso#readme","_id":"obso@0.4.0","_npmVersion":"6.5.0","_nodeVersion":"11.5.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"bd4c2302b218d00795e0014c0a69ba57b1e09ec4","size":3509,"noattachment":false,"key":"/obso/-/obso-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/obso/download/obso-0.4.0.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/obso_0.4.0_1545678457703_0.7353797365369581"},"_hasShrinkwrap":false,"publish_time":1545678457844,"_cnpm_publish_time":1545678457844},"0.3.0":{"name":"obso","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.3.0","repository":{"type":"git","url":"git+https://github.com/75lb/obso.git"},"description":"emitter","module":"emitter.mjs","main":"dist/emitter.js","dependencies":{},"devDependencies":{"jsdoc-to-markdown":"^4.0.1","rollup":"^0.63.4","rollup-plugin-node-resolve":"^3.3.0","rollup-watch":"^4.3.1","test-runner":"^0.5.0","test-runner-counter":"^0.1.2"},"scripts":{"test":"rollup -c dist/emitter.config.js && test-runner test.js","watch":"rollup -c dist/emitter.config.js -w","docs":"jsdoc2md -c jsdoc.conf emitter.mjs > README.md"},"license":"MIT","gitHead":"0a29639f5ceffeda93fdaae080a8dbdcf9702595","bugs":{"url":"https://github.com/75lb/obso/issues"},"homepage":"https://github.com/75lb/obso#readme","_id":"obso@0.3.0","_npmVersion":"6.2.0","_nodeVersion":"10.7.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"e8c6565d1a3b35d09261af78168e950a0fbf4fbd","size":2701,"noattachment":false,"key":"/obso/-/obso-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/obso/download/obso-0.3.0.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/obso_0.3.0_1532550593581_0.11803557679328036"},"_hasShrinkwrap":false,"publish_time":1532550593641,"_cnpm_publish_time":1532550593641},"0.2.0":{"name":"obso","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.2.0","module":"emitter.js","main":"dist/emitter.js","description":"emitter","dependencies":{},"devDependencies":{"jsdoc-to-markdown":"^4.0.1","rollup":"^0.59.3","rollup-plugin-node-resolve":"^3.3.0","rollup-watch":"^4.3.1","test-runner":"^0.5.0","test-runner-counter":"^0.1.2"},"scripts":{"test":"rollup -c dist/emitter.config.js && test-runner test.js","watch":"rollup -c dist/emitter.config.js -w"},"license":"MIT","gitHead":"b9f28305464a7e2fd5aaf4b8c7382e02a85a958e","_id":"obso@0.2.0","_npmVersion":"6.1.0","_nodeVersion":"10.3.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"1a54a1180a06d0447a1a76fba064001b5f219e6d","size":2538,"noattachment":false,"key":"/obso/-/obso-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/obso/download/obso-0.2.0.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/obso_0.2.0_1527631743545_0.9358941929682458"},"_hasShrinkwrap":false,"publish_time":1527631743652,"_cnpm_publish_time":1527631743652},"0.1.0":{"name":"obso","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.1.0","module":"emitter.js","description":"emitter","dependencies":{},"devDependencies":{"rollup":"^0.55.3","rollup-plugin-node-resolve":"^3.0.2","rollup-watch":"^4.3.1","test-runner":"^0.5.0","test-runner-counter":"^0.1.1"},"scripts":{"test":"rollup -c dist/emitter.config.js && rollup -c dist/mixin.config.js && test-runner test/*.js","watch":"rollup -c dist/emitter.config.js -w; rollup -c dist/mixin.config.js -w"},"license":"MIT","gitHead":"e9348e92612a7cc8f6d7f66ace7b020ea70b7b0a","_id":"obso@0.1.0","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"e66e09f2c183f002d533fd0a49d5a997821cda3f","size":2719,"noattachment":false,"key":"/obso/-/obso-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/obso/download/obso-0.1.0.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/obso_0.1.0_1518196414586_0.5513550610515516"},"_hasShrinkwrap":false,"publish_time":1518196415309,"_cnpm_publish_time":1518196415309}},"readme":"[![view on npm](https://badgen.net/npm/v/obso)](https://www.npmjs.org/package/obso)\n[![npm module downloads](https://badgen.net/npm/dt/obso)](https://www.npmjs.org/package/obso)\n[![Gihub repo dependents](https://badgen.net/github/dependents-repo/75lb/obso)](https://github.com/75lb/obso/network/dependents?dependent_type=REPOSITORY)\n[![Gihub package dependents](https://badgen.net/github/dependents-pkg/75lb/obso)](https://github.com/75lb/obso/network/dependents?dependent_type=PACKAGE)\n[![Build Status](https://travis-ci.org/75lb/obso.svg?branch=master)](https://travis-ci.org/75lb/obso)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)\n\n# obso\n\nMake an object observable.\n\n```js\nimport Emitter from 'obso/index.mjs'\nclass Something extends Emitter {}\nconst something = new Something()\nsomething.on('load', () => {\n  console.log('load event fired.')\n})\n```\n\n<a name=\"module_obso\"></a>\n\n## obso\n\n* [obso](#module_obso)\n    * [Emitter](#exp_module_obso--Emitter) ⏏\n        * [.addEventListener](#module_obso--Emitter+addEventListener)\n        * [.emit(eventName)](#module_obso--Emitter+emit)\n        * [.on([eventName], handler, [options])](#module_obso--Emitter+on)\n        * [.removeEventListener(eventName, handler)](#module_obso--Emitter+removeEventListener)\n        * [.once(eventName, handler)](#module_obso--Emitter+once)\n\n<a name=\"exp_module_obso--Emitter\"></a>\n\n### Emitter ⏏\n**Kind**: Exported class  \n<a name=\"module_obso--Emitter+addEventListener\"></a>\n\n#### emitter.addEventListener\nAlias for `on`.\n\n**Kind**: instance property of [<code>Emitter</code>](#exp_module_obso--Emitter)  \n<a name=\"module_obso--Emitter+emit\"></a>\n\n#### emitter.emit(eventName)\nEmit an event.\n\n**Kind**: instance method of [<code>Emitter</code>](#exp_module_obso--Emitter)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| eventName | <code>string</code> | the event name to emit. |\n| ...args | <code>\\*</code> | args to pass to the event handler |\n\n<a name=\"module_obso--Emitter+on\"></a>\n\n#### emitter.on([eventName], handler, [options])\nRegister an event listener.\n\n**Kind**: instance method of [<code>Emitter</code>](#exp_module_obso--Emitter)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [eventName] | <code>string</code> | The event name to watch. Omitting the name will catch all events. |\n| handler | <code>function</code> | The function to be called when `eventName` is emitted. Invocated with `this` set to `emitter`. |\n| [options] | <code>object</code> |  |\n| [options.once] | <code>boolean</code> | If `true`, the handler will be invoked once then removed. |\n\n<a name=\"module_obso--Emitter+removeEventListener\"></a>\n\n#### emitter.removeEventListener(eventName, handler)\nRemove an event listener.\n\n**Kind**: instance method of [<code>Emitter</code>](#exp_module_obso--Emitter)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| eventName | <code>string</code> | the event name |\n| handler | <code>function</code> | the event handler |\n\n<a name=\"module_obso--Emitter+once\"></a>\n\n#### emitter.once(eventName, handler)\nOnce.\n\n**Kind**: instance method of [<code>Emitter</code>](#exp_module_obso--Emitter)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| eventName | <code>string</code> | the event name to watch |\n| handler | <code>function</code> | the event handler |\n\n\n### Load anywhere\n\nThis library is compatible with Node.js, the Web and any style of module loader. It can be loaded anywhere, natively without transpilation.\n\nNode.js:\n\n```js\nconst Emitter = require('obso')\n```\n\nWithin Node.js with ECMAScript Module support enabled:\n\n```js\nimport Emitter from 'obso/index.mjs'\n```\n\nWithin an modern browser ECMAScript Module:\n\n```js\nimport Emitter from './node_modules/obso/index.mjs'\n```\n\nOld browser (adds `window.Emitter`):\n\n```html\n<script nomodule src=\"./node_modules/obso/dist/index.js\"></script>\n```\n\n* * *\n\n&copy; 2018-21 Lloyd Brookes \\<75pound@gmail.com\\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).\n","_attachments":{},"homepage":"https://github.com/75lb/obso#readme","bugs":{"url":"https://github.com/75lb/obso/issues"},"license":"MIT"}