{"name":"seer","version":"3.2.0-beta.2","description":"A customizable devtool solution","license":"MIT","author":{"name":"Balthazar Gronon","email":"bgronon@gmail.com"},"repository":{"type":"git","url":"git://github.com/uber-web/probe.gl.git"},"keywords":["uber","devtools","debug","deck.gl","luma.gl","seer"],"main":"dist","scripts":{"build":"rm -rf dist && mkdir dist && babel index.js -o dist/index.js","docs":"cat docs/header.md > README.md && jsdoc2md index.js >> README.md && sed -i '' '30,1000s/##/###/g' README.md"},"devDependencies":{"babel-cli":"^6.24.1","babel-plugin-module-resolver":"^2.7.0","babel-preset-es2015":"^6.24.1","babel-preset-stage-0":"^6.24.1","jsdoc-to-markdown":"^3.0.0"},"gitHead":"c54a8a93f049c88a56e2e6a72e400d47b869aef0","readme":"# Seer API\n\nThis library provides an abstraction around the [Window.postMessage API](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage)\nto interact with the Seer extension.\nYou could use this module if you have a framework or application that wants to display debugging\ninformation in the Seer Chrome extension.\n\n## Install\n\nSimply download the package from the npm registry\n\n    yarn add seer\n\n## Notes\n\nThe extension will declare a `__SEER_INITIALIZED__` boolean on the window,\nthat you can use to check if the extension is installed and prevent any useless\nprocessing in production or for real-users.\n\n## Internal\n\nHow the communication is done exactly relies on the bridge, that you can checkout\nin its dedicated [directory](../src/bridge). The following schema represent the\ncomplete data flow:\n\n<img src=\"https://cdn.pbrd.co/images/92al0O7cY.png\" height=\"300\" />\n\n## Functions\n\n<dl>\n<dt><a href=\"#isReady\">isReady()</a> ⇒ <code>Boolean</code></dt>\n<dd><p>Ready check for Seer initialization</p>\n</dd>\n<dt><a href=\"#throttle\">throttle(key, delay)</a> ⇒ <code>Boolean</code></dt>\n<dd><p>Utility method allowing to throttle a user action based on a key and a minimun delay.</p>\n</dd>\n<dt><a href=\"#send\">send(type, payload)</a></dt>\n<dd><p>Low-level api leveraging window.postMessage</p>\n</dd>\n<dt><a href=\"#init\">init()</a></dt>\n<dd><p>Initilize window listener. There will be only one for the whole process\nto prevent too many registrations.</p>\n<p>This method will be called automatically if you use the <code>listenFor</code> method.</p>\n</dd>\n<dt><a href=\"#clean\">clean()</a></dt>\n<dd><p>Clean listener. Can be useful in case you want to unregister upcoming events\nor liberate memory.</p>\n</dd>\n<dt><a href=\"#listenFor\">listenFor(key, cb)</a></dt>\n<dd><p>Create a listener that will be called upon events of the given key.</p>\n</dd>\n<dt><a href=\"#removeListener\">removeListener(cb)</a></dt>\n<dd><p>Remove an identity listener</p>\n</dd>\n<dt><a href=\"#list\">list(key, data)</a></dt>\n<dd><p>Creates a new indexed list.\nIt works by index to get O(1) accessing and performance.</p>\n</dd>\n<dt><a href=\"#listItem\">listItem(key, itemKey, data)</a></dt>\n<dd><p>Creates an element in the indexed list, based on the itemKey.</p>\n</dd>\n<dt><a href=\"#updateItem\">updateItem(key, itemKey, path, data)</a></dt>\n<dd><p>Update an item property, can be deeply nested.</p>\n</dd>\n<dt><a href=\"#multiUpdate\">multiUpdate(key, itemKey, array)</a></dt>\n<dd><p>Similar to updateItem, but allows to pass an array with {path,data} pairs for\nmultiple update of the same item without having to send multiple messages.</p>\n</dd>\n<dt><a href=\"#deleteItem\">deleteItem(key, itemKey)</a></dt>\n<dd><p>Remove a specific item in a specific tab.</p>\n</dd>\n<dt><a href=\"#addLog\">addLog(key, itemKey, msg)</a></dt>\n<dd><p>Will create a log message to an item, that will be displayde with the current time.</p>\n</dd>\n</dl>\n\n<a name=\"isReady\"></a>\n\n### isReady() ⇒ <code>Boolean</code>\nReady check for Seer initialization\n\n**Kind**: global function  \n<a name=\"throttle\"></a>\n\n### throttle(key, delay) ⇒ <code>Boolean</code>\nUtility method allowing to throttle a user action based on a key and a minimun delay.\n\n**Kind**: global function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | <code>String</code> | A unique key |\n| delay | <code>Number</code> | The minimal delay to throttle |\n\n<a name=\"send\"></a>\n\n### send(type, payload)\nLow-level api leveraging window.postMessage\n\n**Kind**: global function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The action type |\n| payload | <code>Any</code> | The action payload |\n\n<a name=\"init\"></a>\n\n### init()\nInitilize window listener. There will be only one for the whole process\nto prevent too many registrations.\n\nThis method will be called automatically if you use the `listenFor` method.\n\n**Kind**: global function  \n<a name=\"clean\"></a>\n\n### clean()\nClean listener. Can be useful in case you want to unregister upcoming events\nor liberate memory.\n\n**Kind**: global function  \n<a name=\"listenFor\"></a>\n\n### listenFor(key, cb)\nCreate a listener that will be called upon events of the given key.\n\n**Kind**: global function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | <code>String</code> | The unique tab key |\n| cb | <code>function</code> | A callback that will receive the message payload |\n\n<a name=\"removeListener\"></a>\n\n### removeListener(cb)\nRemove an identity listener\n\n**Kind**: global function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cb | <code>function</code> | The callback to remove |\n\n<a name=\"list\"></a>\n\n### list(key, data)\nCreates a new indexed list.\nIt works by index to get O(1) accessing and performance.\n\n**Kind**: global function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | <code>String</code> | The key of the tab |\n| data | <code>Object</code> | The indexed object |\n\n<a name=\"listItem\"></a>\n\n### listItem(key, itemKey, data)\nCreates an element in the indexed list, based on the itemKey.\n\n**Kind**: global function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | <code>String</code> | The key of the tab |\n| itemKey | <code>String</code> | The key of the item |\n| data | <code>Any</code> | The value of the item |\n\n<a name=\"updateItem\"></a>\n\n### updateItem(key, itemKey, path, data)\nUpdate an item property, can be deeply nested.\n\n**Kind**: global function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | <code>String</code> | The key of the tab |\n| itemKey | <code>String</code> | The key of the item |\n| path | <code>String</code> | The path of the variable you want to update |\n| data | <code>Object</code> | The new value |\n\n<a name=\"multiUpdate\"></a>\n\n### multiUpdate(key, itemKey, array)\nSimilar to updateItem, but allows to pass an array with {path,data} pairs for\nmultiple update of the same item without having to send multiple messages.\n\n**Kind**: global function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | <code>String</code> | The key of the tab |\n| itemKey | <code>String</code> | The key of the item |\n| array | <code>Array</code> | The array of updates |\n| array.path | <code>String</code> | The path for this update |\n| array.data | <code>Object</code> | The value of this update |\n\n<a name=\"deleteItem\"></a>\n\n### deleteItem(key, itemKey)\nRemove a specific item in a specific tab.\n\n**Kind**: global function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | <code>String</code> | They key of the tab |\n| itemKey | <code>String</code> | The key of the item |\n\n<a name=\"addLog\"></a>\n\n### addLog(key, itemKey, msg)\nWill create a log message to an item, that will be displayde with the current time.\n\n**Kind**: global function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | <code>String</code> | The key of the tab |\n| itemKey | <code>String</code> | The key of the item |\n| msg | <code>String</code> | The message to display |\n\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/uber-web/probe.gl/issues"},"homepage":"https://github.com/uber-web/probe.gl#readme","_id":"seer@3.2.0-beta.2","_nodeVersion":"10.16.3","_npmVersion":"lerna/3.16.5/node@v10.16.3+x64 (darwin)","dist":{"integrity":"sha512-COxaTaZIZiJXdbIZmsaDnzYYoM4xgITxFsM51F2CTbmPfpdwqCsKfQf3gzkIZ5CQb1z8ALw64gw9Os7HfpYp/Q==","shasum":"8ef4668c12d317d5c29a619d9797cb4d0eb0933f","tarball":"http://registry-npm.ywwl.com/seer/download/seer-3.2.0-beta.2.tgz","fileCount":9,"unpackedSize":66978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6YmBCRA9TVsSAnZWagAAigwP/03SX6pO+Jfmyeqh2wOr\nAJuMNX63sqJULjr8xYbY5MIm6JQCHcNczhNfJTynXOHMXVUSglis9e9mJS8m\nKxfW72408FNU6ml8/THpITk0l4Qz5LYTzp7/vCzEEsY6pXK4m1+RP29FOcKQ\nQMDBl44vfVdsoFayQujXbsiPtbxBh7ybq27zZs6QwFiRgASjCToe8zP7e/Cm\nD3iceqPKBBcf3gu4rh2vKietqWIYZydSR/veRVDXiTZMTyo7jNvwdqacb03C\n+uWfW1AR45lQAWgSje/aHPbN4KZUAacKiSF/9pjbnlywGdr/iLclxuwnsw1B\nwGpfix0pRkwU35ShkDaT1JMjeIjJ/8nItSxMBPysrR0eoi/rPfyqjlH5zHx8\nK4RaLhxi5Tzjn64uA31fqvz4ZMiFZB/qdPZ6tGKvHaDkqgewJiNlLNvRs44M\nR4S7lEYVT0bnfs6FjdlCbcwOFI3LXy/Ss6F8Uj1ynC+IwA2175fu5ltZJ6/q\nS8yfbgmNMuPVmIfFLGPch8rzUnGYXXbHeVWrVwKXJToAsB0/qH+1IlrcBpFT\nzzaiX5QpGlqHV5XZpEYRzxRWEb46uLc3Ig2N/WhldgCczFfxpheGeKnI0lr2\n2sN/F86yeB/fa0cPl/5c9LULM2KJYvTRJ4j/u0x/JTLHALoNuBpF1NfjJoJn\nQu7c\r\n=vN8R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/l8hfzEZskOk01cvyGSOoNOTUlPbFzdQrfLBtASVXPAIhAPrvpp3mym5GzCtM/oR/GZ4QbLiPfyylaqaRZNBHGVc6"}],"size":8218,"noattachment":false,"key":"/seer/-/seer-3.2.0-beta.2.tgz"},"maintainers":[{"email":"chandu@uber.com","name":"1chandu"},{"email":"bgronon@gmail.com","name":"apercu"},{"email":"ajduberstein+js@gmail.com","name":"duber"},{"email":"georgios@uber.com","name":"georgios-uber"},{"email":"gnavvy@gmail.com","name":"gnavvy"},{"email":"ib.green.home@gmail.com","name":"ibgreen"},{"email":"ib_green@msn.com","name":"ibgreen-xviz"},{"email":"jianh@uber.com","name":"jianh"},{"email":"cxiaoji@gmail.com","name":"pessimistress"},{"email":"tgorkin@uber.com","name":"tgorkin"},{"email":"tareksherif@pm.me","name":"tsherif"},{"email":"xintong@uber.com","name":"xintong"}],"_npmUser":{"name":"pessimistress","email":"cxiaoji@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/seer_3.2.0-beta.2_1575586177222_0.78417232469127"},"_hasShrinkwrap":false,"publish_time":1575586177359,"_cnpm_publish_time":1575586177359,"dist-tags":{"beta":"4.1.0-alpha.2","latest":"4.1.2"}}