Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
This library provides an abstraction around the Window.postMessage API to interact with the Seer extension. You could use this module if you have a framework or application that wants to display debugging information in the Seer Chrome extension.
Simply download the package from the npm registry
yarn add seer
The extension will declare a __SEER_INITIALIZED__
boolean on the window,
that you can use to check if the extension is installed and prevent any useless
processing in production or for real-users.
How the communication is done exactly relies on the bridge, that you can checkout in its dedicated directory. The following schema represent the complete data flow:
Boolean
Ready check for Seer initialization
Boolean
Utility method allowing to throttle a user action based on a key and a minimun delay.
Low-level api leveraging window.postMessage
Initilize window listener. There will be only one for the whole process to prevent too many registrations.
This method will be called automatically if you use the listenFor
method.
Clean listener. Can be useful in case you want to unregister upcoming events or liberate memory.
Create a listener that will be called upon events of the given key.
Remove an identity listener
Creates a new indexed list. It works by index to get O(1) accessing and performance.
Creates an element in the indexed list, based on the itemKey.
Update an item property, can be deeply nested.
Similar to updateItem, but allows to pass an array with {path,data} pairs for multiple update of the same item without having to send multiple messages.
Remove a specific item in a specific tab.
Will create a log message to an item, that will be displayde with the current time.
Boolean
Ready check for Seer initialization
Boolean
Utility method allowing to throttle a user action based on a key and a minimun delay.
Kind: global function
Param | Type | Description |
---|---|---|
key | String | A unique key |
delay | Number | The minimal delay to throttle |
Low-level api leveraging window.postMessage
Kind: global function
Param | Type | Description |
---|---|---|
type | String | The action type |
payload | Any | The action payload |
Initilize window listener. There will be only one for the whole process to prevent too many registrations.
This method will be called automatically if you use the listenFor
method.
Clean listener. Can be useful in case you want to unregister upcoming events or liberate memory.
Create a listener that will be called upon events of the given key.
Kind: global function
Param | Type | Description |
---|---|---|
key | String | The unique tab key |
cb | function | A callback that will receive the message payload |
Remove an identity listener
Kind: global function
Param | Type | Description |
---|---|---|
cb | function | The callback to remove |
Creates a new indexed list. It works by index to get O(1) accessing and performance.
Kind: global function
Param | Type | Description |
---|---|---|
key | String | The key of the tab |
data | Object | The indexed object |
Creates an element in the indexed list, based on the itemKey.
Kind: global function
Param | Type | Description |
---|---|---|
key | String | The key of the tab |
itemKey | String | The key of the item |
data | Any | The value of the item |
Update an item property, can be deeply nested.
Kind: global function
Param | Type | Description |
---|---|---|
key | String | The key of the tab |
itemKey | String | The key of the item |
path | String | The path of the variable you want to update |
data | Object | The new value |
Similar to updateItem, but allows to pass an array with {path,data} pairs for multiple update of the same item without having to send multiple messages.
Kind: global function
Param | Type | Description |
---|---|---|
key | String | The key of the tab |
itemKey | String | The key of the item |
array | Array | The array of updates |
array.path | String | The path for this update |
array.data | Object | The value of this update |
Remove a specific item in a specific tab.
Kind: global function
Param | Type | Description |
---|---|---|
key | String | They key of the tab |
itemKey | String | The key of the item |
Will create a log message to an item, that will be displayde with the current time.
Kind: global function
Param | Type | Description |
---|---|---|
key | String | The key of the tab |
itemKey | String | The key of the item |
msg | String | The message to display |
v4.0.9
FAQs
A customizable devtool solution
The npm package seer receives a total of 2,665 weekly downloads. As such, seer popularity was classified as popular.
We found that seer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.