https://github.com/volijs/mixturejs
ES6/ES5 mixins, synchronous events, and object manipulation tools.
https://github.com/volijs/mixturejs
events javascript mixins synchronous-events typescript
Last synced: 2 months ago
JSON representation
ES6/ES5 mixins, synchronous events, and object manipulation tools.
- Host: GitHub
- URL: https://github.com/volijs/mixturejs
- Owner: VoliJS
- License: mit
- Created: 2016-02-26T20:12:43.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-18T22:28:12.000Z (over 9 years ago)
- Last Synced: 2025-04-17T22:41:42.162Z (about 1 year ago)
- Topics: events, javascript, mixins, synchronous-events, typescript
- Language: TypeScript
- Homepage:
- Size: 487 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MixtureJS
Mixins is very powerful abstraction addressing cross-cutting concerns, which can dramatically simplify inheritance graph when used wisely.
MixtureJS is the toolkit combining React-style mixins, Backbone-style events, and minimal set of Underscore-style object manipulation functions. Just what you need when you're working in modern ES5/ES6 envorinment, packed in API which you already know.
Written in TypeScript, works with ES5, ES6, and TypeScript.
API docs: [here](http://volicon.github.io/mixturejs/)
## Events Performance
MixtureJS _implements_ [Backbone API for Events](http://backbonejs.org/#Events), but internally it's entirely different. Here's the results of the typical
run of the [performance tests](/tests) enclosed.

## Features
- `Mixable`, React-style mixins implementation.
- Fine-grained control over member merge rules.
- Can mix both classes and plain objects.
- Works with and without ES6 class decorators.
- `Object.extend` to simulate classes in ES5.
- 100% backward compatible with Backbone `.extend()`.
- Complete `Mixable` support.
- Native properties declatations (`properties` specification).
- `Messenger`, synchronous events.
- Can be used as mixin and as a base class.
- 100% backward API compatibility with [Backbone Events](http://backbonejs.org/#Events) (passes Backbone 1.2.x unit test)
- Much faster than Backbone events.
- `tools`
- Object manipulation tools (`assign`, `defaults`, `mapObject`, etc).
- Simple logging API with variable log-level and overridable functions. Defaults to the `console`.