Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@doop/deepstream
Advanced tools
Deepstream.io adapter for Doop.
Features vs. Vanilla Deepstream:
get()
/ set()
implementations which try to avoid subscribing to Deepstream to fetch data when possibledotted.notation
, slash/notation
or ['array', 'format']
this/is/a/record@this/is/a/subkey
See config.js for example config to merge.
The module will be detected and loaded automatically with the server as app.deepstream
.
The vm.$deepstream
service should be loaded by default.
app.component({
data() { return {
doc: {},
}},
watch: {
doc: {
deep: true,
handler() {
this.$debug('SET', this.doc);
this.$deepstream.set(this.doc);
},
},
},
created() {
this.$debug.enable(true);
this.record = this.$deepstream.get('debug/deepstream');
this.record.subscribe(values => {
this.$debug('GET', this.doc);
this.doc = values;
});
},
});
The actual DeepstreamClient instance.
General options for the Deepstram wrapper.
Options are:
Option | Type | Default | Description |
---|---|---|---|
pathAtNotation | boolean | true | Support At notation when splitting paths |
pathSplitSlash | boolean | true | Support path seperators with slashes |
pathSplitDot | boolean | false | Support path seperators with dots |
split | function | See code | Path spliter function |
An object containing all loaded records.
Boolean indicating if the module has loaded, connected and authenticated.
Async function which establishes a connection with an optional auth
object.
Fetch (+cache) a DeepstreamRecord instance for a given path.
Internal function used to seperate a regular path into component deepstream docName
+ docPath
specs, used by some DS functions.
This function supports dotted.notation
, slash/notation
and ['array', 'notation']
. Array members are sanitised and is the recommended method to specifiy a path.
Async function to fetch a given, nested path.
See splitPath()
for valid path specifications.
If the record doesn't exist the fallback is used instead of throwing.
Async function which will return a boolean if the path exists.
Async function to set a given, nested path.
See splitPath()
for valid path specifications.
Convenience async function to merge the given values
object into an existing object + save.
See splitPath()
for valid path specifications.
Subscribe to a path, calling the callback as cb(newValue)
for any change.
Options can be:
Option | Type | Default | Description |
---|---|---|---|
immediate | boolean | true | Whether to fire the subscription immediately with the current value, if falsy only updates will fire the callback |
Release a given callback from its subscription.
Bind a local Vue variable to a remote Deepstream path.
Read or writes to the remote will sync with local (assuming the correct allow{Read,Write}
options are enabled).
Options can be:
Option | Type | Default | Description |
---|---|---|---|
immediate | boolean | true | Whether to fetch the state immediately after subscription |
allowRead | boolean | true | Keep the local state up to date with the remote |
allowWrite | boolean | true | Keep the remote state up to date with local |
readData | function | Function to call as (newData) when any data is incomming from remote | |
writeData | function | Function to call as (newData) before changes are transmitted to remote |
Notes:
readData
and writeData
can mutate incomming / outgoing data respectively{allowWrite: false}
is essencially the same as $deepstream.subscribe(path, cb)
but automatically updates local state without a callbackClean up all bindings and release any pending subscriptions.
Called automatically when a Vue component is entering the beforeDestroy
lifecycle stage.
Object for Remote-Procedure-Calls.
Regisiter an RPC function.
Call a registered RPC function with an optional data object.
FAQs
Deepstream.io adapter for Doop
The npm package @doop/deepstream receives a total of 2 weekly downloads. As such, @doop/deepstream popularity was classified as not popular.
We found that @doop/deepstream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.