Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
backbone-events-standalone
Advanced tools
This is an extraction of the Events module of Backbone which can be used standalone (no external dependency), in the browser or in a nodejs environment.
This project started because I appreciate the Backbone.Events
interface &
features while I wanted to keep using it within non-DOM environments (think a
Social API Web Worker for example).
I've ported the original Backbone.Events tests to mocha & chai so I can run them within a nodejs environment and ensure the extracted API actually works as expected without the burden of setting up continuous integration of browser tests.
$ bower install backbone-events-standalone
$ npm install backbone-events-standalone
<script src="backbone-events-standalone.js"></script>
<script>
// use BackboneEvents
</script>
Notes:
backbone-events-standalone.min.js
.bower_components/backbone-events-standalone
require(["backbone-events-standalone"], function(BackboneEvents) {
// ...
});
var BackboneEvents = require("backbone-events-standalone");
The BackboneEvents#mixin
method helps extending any object or prototype to add eventing
support to it:
var myEventEmitter = BackboneEvents.mixin({});
myEventEmitter.on("foo", console.log).trigger("foo", "hello emitter");
// alternatively
function Plop() {}
BackboneEvents.mixin(Plop.prototype);
(new Plop()).on("foo", console.log).trigger("foo", "hello emitter");
BackboneEvents
API & usage is the same as Backbone.Events.
$ npm test
MIT
Jeremy Ashkenas, Backbone author
FAQs
Standalone version of Backbone.Events
The npm package backbone-events-standalone receives a total of 8,944 weekly downloads. As such, backbone-events-standalone popularity was classified as popular.
We found that backbone-events-standalone 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.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.