Coder Social home page Coder Social logo

oo7-bare's Introduction

oo7

A small library providing what might be termed as reactive expressions, Bonds (hence the name). Classes deriving from Bond are expected to determine when their value has changed and call trigger accordingly.

TimeBond is provided as a simple expression type which evaluates to the current time and triggers an update once per second.

Expressions can be composed through TransformBond, which allows both argument dependencies (that get passed into the combination transform) and non-argument dependencies (which do not). For its dependencies, TransformBond is able to work with basic values, Promises and other Bonds abstractly.

Installation

  npm install oo7 --save

Usage

  var oo7 = require('oo7'),
      Bond = oo7.Bond,
      TimeBond = oo7.TimeBond,
	  TransformBond = oo7.TransformBond;

  let t = new TimeBond;

  // Prints the Unix time every second.
  t.tie(console.log);

  // Prints the formatted date every second.
  new TransformBond(x => new Date(x), [t]).tie(console.log);

Tests

  npm test

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

For development, a number of git hooks are provides that allow you to ensure tightly couple packages remain locally referenced at development time and switched to the proper version at commit/publish time. Simply copy all files from hooks into the git hook path:

cp hooks/* .git/hooks

NPM's publishing functionality automatically ensures packages reference the latest of their dependencies in the tightly-coupled group, and bumps the patch version after publication.

For all of this to work, ensure this, oo7-parity, oo7-react and parity-reactive-ui all exist in the same parent directory.

Release History

  • 0.1.2
  • 0.1.1 Minor fix.
  • 0.1.0 Initial release

oo7-bare's People

Contributors

derhuerst avatar gavofyork avatar stemmig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.