Skip to content

mrlennartsson/matreshka

 
 

Repository files navigation

Matreshka v1.0.4

Matreshka Website

Join the chat at https://gitter.im/finom/matreshka

<script src="matreshka.min.js"></script>
<input type="text" class="my-input">
<script>
var app = new Matreshka;
app.bindNode( 'x', '.my-input' );
app.x = 'Two-way data binding in JS? O rly?';
</script>

Matreshka - is a small and powerful client-side JavaScript framework that allows you to build single page applications as simply as possible.

  • Two-way data-bindings in JavaScript files. No more {{weird.syntax}} inside HTML.
  • It's simple. Really. You don't need to learn mass of articles to get started.
  • Custom architecture. You can choose any way how you build an application.

Todo

  • Fire remove and modify when data key is removed from Matreshka.Object instance (remove, removeDataKeys)
  • force flag for Matreshka.Array events
  • Matreshka#off for delegated DOM events with specified selector
  • Refactor Matreshka#_on and Matreshka#_off methods
  • Remove event after handler call in Matreshka#once
  • binder.destroy member that calls when Matreshka#unbindNode is called
  • private global event flag that makes event to be silent for delegated handlers
  • Fire remove event on data remove for Matreshka.Object
  • Export Matreshka using ES6 syntax
  • Automated testing
  • Comment every part of code
  • Matreshka.Array.of
  • Matreshka.Array.from

Maybe will be added in next versions

  • Matreshka.toMatreshka - converts JS object to Matreshka instance
  • Some way to get parents from delegated Matreshka events
  • toJSONString method
  • bindSandbox method which accepts single argument + event options
  • this.bound.key instead of this.bound('key') as alternative

Resources

The website

Docs in Russian

Gitter chat in Russian

JSDoc files for IDE (ENG, RUS)

TodoMVC

Issues

Twitter

Author: Andrey Gubanov [email protected]

License: MIT License

Packages

No packages published

Languages

  • JavaScript 100.0%