Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@moos/backbone-fetch
Advanced tools
Backbone Model CRUD operations
using ES6 fetch API. Can be used without jQuery
or jQuery.ajax
.
npm i @moos/backbone-fetch
Or get it from jsDelivr CDN...
Latest:
Versioned (recommemded in production):
require('backbone');
Backbone.ajax = require('@moos/backbone-fetch'); // or use <scrip>
let model = new Backbone.Model({foo: 1});
model.save()
.then(response => {...})
.catch(error => {...});
Similar for other Backbone CRUD operations: fetch()
& destroy()
.
Note: it returns an ES6 Promise. Use polyfill for older browsers.
To pass body and headers:
model.save(null, {
data: {...} // JSON data to pass in HTTP body
headers: {
'Accept': 'application/json'
}
})
.then(response => {...})
.catch(error => {...});
If AbortController is supported (sorry IE or use a polyfill), the returned promise will have an abort()
method:
var promise = model.fetch();
// a little later...
promise.abort();
The success of abort depends on the state of the fetch call at the time abort was called. According to AbortController/abort() docs, "when abort() is called, the fetch() promise rejects with an AbortError."
ICS
FAQs
Backbone Models without jQuery.ajax
We found that @moos/backbone-fetch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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 threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.