{"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":{"integrity":"sha512-uR/dL5K83ihuWcJOyMSb39VUN6Xidu25mSxKgK4rarOtWxJ58I1l1QYBiHrf1oQ2GWPSOgEa1wAHF+Dc6+GR6A==","shasum":"7366b74ff076c3e8ab7410cb0b8c4cbd13d22d7c","tarball":"http://registry-npm.ywwl.com/obso/download/obso-0.4.1.tgz","fileCount":9,"unpackedSize":17449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJAJ5CRA9TVsSAnZWagAABzYP+QBXCaumbGtd+1iqZ1Eu\nWUbGnIhhAGxd2vmWUoNOdlsdx5T3bOw2j3+ouTPDOY0ZQviyeq4Wq3/3Cx5p\nu/HyItF2/Ivsp3ZJNWCNsYO6PcLMomjKOMXDMwdrOLuKD/5AvpWTYoOklD3F\nE3/laJ2eZa9NUOoKZS3ggqu6SK/RJKZddtV4v15TQbtqEKME6LnM45VWfOZa\n98EDYv3QaSgroRJSU38GSG8o2hCzmzEf7xybw+hGs7Ln6Do9fK94aR4vZa/v\nRHVRA+IdQX4ePLaoYVWzgPRUouZxqvWc7SeBsCqlwlzIDA8Fe5UVXHZJA9wi\nPjsSsp+96nHRrJIbcP+XqWF65TQ24hi9HmTaN/uBBMhKDtrZvCKRVdLkntud\nAiuD80oJp+VnrSPQVVro6q5j2s7eP8nYqEo00mq5aZxp220oWsdO1perpgSN\n2sY2b85UNfBxbJsPLUDpjFBPZvlmfftgL/ZKQxdxT+zoUk55z25g0Q3yV4ie\nx7eWQ85neHMpq8mDhfRWv0aEhf7C7SibxsQLmm3kjc7Q2kBO7BSs1CD2zelR\n3qJnomlrddcRgsXHv+Jlx1hfdjpup7cGHmPOhn2zcJ1CSklRVCwVElvKhFU5\n8TXQQsHhjy0KcWERyaESQe68GK5L/DMIiWYvyib4OxDEaYEphLMR8h81VJ+0\nQUUh\r\n=kAuE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDFyKiYDXmTnKJzLDe7YWcrQ6O5jO1Nbo/IhHzfOVPgdAiAKLiFq5NT19N1zLWHx4XE1VIrQzy9Fz4A3TmUVluJDfA=="}],"size":3649,"noattachment":false,"key":"/obso/-/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,"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","publish_time":1545863800780,"_cnpm_publish_time":1545863800780,"dist-tags":{"latest":"0.7.0"}}