Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

paritytech/oo7

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

oo7 Suite

Build Status

npm:oo7 npm:oo7-parity npm:oo7-react

The oo7 suite consists of three independent packages:

  • oo7 - Reactive Bonds
  • oo7-parity - Bonds bindings for Ethereum objects
  • oo7-react - React components to display Bonds

Documentation

Documentation to all three packages can be found here

Examples

oo7

// npm i oo7
import {TimeBond} from 'oo7'


// Initialize the bond
const bond = new TimeBond()
bond
    .map(t => new Date(t))
    .tie(date => console.log(`${date}`))
    // Wed Oct 11 2017 12:14:56 GMT+0200 (CEST)

oo7-parity

// npm i oo7-parity
import {Bonds, formatBalance} from 'oo7-parity'

const bonds = Bonds()

bonds.balance(bonds.me)
    .map(formatBalance)
    .tie(console.log) // 4.45 ETH

oo7-react

import ReactDOM from 'react-dom'
import React, { Component } from 'react'

// Import reactive element
import {Rspan} from 'oo7-react'
import {Bonds, formatBalance} from 'oo7-parity'

const bonds = new Bonds()

class App extends Component {
  render() {
    // Simply render bonds
    return (
      <div>
          <Rspan>
            {bonds.me} has 
            {bonds.balance(bonds.me).map(formatBalance)}
          </Rspan>
      </div>
    );
  }
}

ReactDOM.render(<App />, document.querySelector('body'))

About

The Bonds framework along with associated modules.

Resources

Security policy

Stars

Watchers

Forks

Packages

No packages published