GithubHelp home page GithubHelp logo

teainahat / chain-able Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fluents/chain-able

0.0 1.0 0.0 303 KB

Easy interfaces that describe their intentions

Home Page: https://github.com/fluents/chain-able/wiki

JavaScript 99.94% Makefile 0.06%

chain-able's Introduction

โ›“ chain-able

NPM version docs Dependencies fliphub BuildStatus Coverage Status Codacy Badge gzip size fluent

interfaces that describe their intentions

๐Ÿ—ฃ expressive

traditional

class Traditional {
  constructor() {
    this.data = {}
  }
  build(index, name, object) {
    this.data.index = index
    this.data.name = name
    this.data.object = object
  }
}
const classico = new Traditional()
classico.build(1, 'string', {object: true})

fluent

class Chain extends Chainable {
  constructor(parent) {
    super(parent)
    this.extend(['index', 'name', 'object'])
  }
}
const chain = new Chainable()
  .index(1)
  .name('string')
  .object(true)

๐Ÿฐ benefits

writing an api using chain-able means:

  • write 1 api,
  • get 3 apis as a result!
    • ๐Ÿ‰ persistable, rehydratable, & transferrable configurations
    • โ›“ fluent/chainable api
    • ๐Ÿฆ vanilla object syntax

๐ŸŽ features

๐Ÿ”— links & more

chain-able's People

Contributors

aretecode avatar codacy-badger avatar

Watchers

 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.