Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fluents/chain-able
Easy interfaces that describe their intentions
https://github.com/fluents/chain-able
chain chain-able chainable chains define expressive factory fluent interface library
Last synced: 3 months ago
JSON representation
Easy interfaces that describe their intentions
- Host: GitHub
- URL: https://github.com/fluents/chain-able
- Owner: fluents
- Created: 2017-05-26T02:14:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-12T22:04:26.000Z (over 7 years ago)
- Last Synced: 2024-05-20T10:22:45.884Z (6 months ago)
- Topics: chain, chain-able, chainable, chains, define, expressive, factory, fluent, interface, library
- Language: JavaScript
- Homepage: https://chain-able.js.org
- Size: 2.91 MB
- Stars: 21
- Watchers: 5
- Forks: 8
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-fluents - chain-able - - *Maintainer*: `James`[![Github](https://rawgit.com/d3viant0ne/awesome-webpack/master/media/github-square.svg)](https://github.com/aretecode)[![Twitter](https://rawgit.com/d3viant0ne/awesome-webpack/master/media/twitter-square.svg)](https://twitter.com/aretecode) (My Fluent Packages)
README
# ⛓ chain-able
[![NPM version][chain-able-npm-image]][chain-able-npm-url]
[![docs](https://img.shields.io/badge/📖-docs-blue.svg)](https://github.com/fluents/chain-able/wiki)
[![Dependencies][david-deps-img]][david-deps-url]
[![fliphub][gitter-badge]][gitter-url]
[![BuildStatus](https://travis-ci.org/fluents/awesome-fluents.svg?branch=master)](https://travis-ci.org/fluents/awesome-fluents)
[![Coverage Status](https://coveralls.io/repos/github/fluents/chain-able/badge.svg?branch=master)](https://coveralls.io/github/fluents/chain-able?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b1d92a30c4aa43df9a6233cfadde2307)](https://www.codacy.com/app/aretecode/chain-able?utm_source=github.com&utm_medium=referral&utm_content=fluents/chain-able&utm_campaign=Badge_Grade)
[![gzip size](http://img.badgesize.io/https://unpkg.com/[email protected]/index.amd.js?compression=gzip)](https://unpkg.com/[email protected])
[![fluent](https://img.shields.io/badge/⛓-fluent-9659F7.svg)](https://github.com/fluents/awesome-fluents)
[![fluent](https://img.shields.io/badge/🎡-playground-black.svg)](https://aretecode.github.io/chain-able-playground/)[david-deps-img]: https://img.shields.io/badge/0-dependencies-blue.svg
[david-deps-url]: https://david-dm.org/fluents/chain-able
[chain-able-npm-image]: https://img.shields.io/npm/v/chain-able.svg
[chain-able-npm-url]: https://npmjs.org/package/chain-able
[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: https://spdx.org/licenses/MIT
[gitter-badge]: https://img.shields.io/gitter/room/fliphub/pink.svg
[gitter-url]: https://gitter.im/fliphub/Lobby[wiki]: https://github.com/fluents/chain-able/wiki
[deps]: https://github.com/fluents/chain-able/wiki/deps
[parent]: https://github.com/fluents/chain-able/wiki/parent
[analogy]: https://github.com/fluents/chain-able/wiki/analogy
[Observe]: https://github.com/fluents/chain-able/wiki/Observe
[DotProp]: https://github.com/fluents/chain-able/wiki/DotProp
[Schema]: https://github.com/fluents/chain-able/wiki/Schema
[Transform]: https://github.com/fluents/chain-able/wiki/Transform
[Shorthand]: https://github.com/fluents/chain-able/wiki/Shorthand
[API]: https://github.com/fluents/chain-able/wiki/api
[compose]: https://github.com/fluents/chain-able/wiki/Compose
[Chainable]: https://github.com/fluents/chain-able/wiki/Chainable
[ChainedMap]: https://github.com/fluents/chain-able/wiki/ChainedMap
[ChainedSet]: https://github.com/fluents/chain-able/wiki/ChainedSet
[FactoryChain]: https://github.com/fluents/chain-able/wiki/FactoryChain
[MergeChain]: https://github.com/fluents/chain-able/wiki/MergeChain
[MethodChain]: https://github.com/fluents/chain-able/wiki/MethodChain
[TraverseChain]: https://github.com/fluents/chain-able/wiki/TraverseChain
[CHANGELOG]: https://github.com/fluents/chain-able/blob/master/docs/CHANGELOG.md
[Snippet]: https://github.com/fluents/chain-able/wiki/Snippet
[Examples]: https://github.com/fluents/chain-able/wiki/Examples
[ExamplesPrimitives]: https://github.com/fluents/chain-able/wiki/Primitives
[ExamplesLocalStorage]: https://github.com/fluents/chain-able/wiki/LocalStorage
[ExamplesExpressive]: https://github.com/fluents/chain-able/wiki/LocalStorage
[ExamplesComparison]: https://github.com/fluents/chain-able/wiki/Comparison
[ExamplesIteratable]: https://github.com/fluents/chain-able/wiki/Iteratable
[TypeDefs]: https://github.com/fluents/chain-able/tree/master/typings
[Tests]: https://github.com/fluents/chain-able/tree/master/test
[Src]: https://github.com/fluents/chain-able/tree/master/src
[map]: https://ponyfoo.com/articles/es6-maps-in-depth
[set]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Set
[cov]: https://coveralls.io/github/fluents/chain-able?branch=master> interfaces that describe their intentions
### 📦 install
```bash
yarn add chain-able
npm i chain-able --save
```# 🏰 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
- [expressive, clearly communicative code][wiki]
- [runtime type validation][Schema]
- [🔬 230+ tests][Tests] with [96%+ code coverage][cov]
- ⚡ [performant & tiny][Src] `~7kb` _(gzip)_ [_300 byte_ minimal version available as snippet][snippet]more...
- [🌐 api][API]
- [⛓ Chainable][Chainable]
- [🗺 ChainedMap][ChainedMap]
- [🔢 ChainedSet][ChainedSet]
- [🍴 extends Map & Set, same transparent api][map]
- [🔣 symbols to make usage even easier][Chainable]
- [🍭 iteratable][ExamplesIteratable]
- [🗣 expressive][ExamplesExpressive]
- [👾 makes solving complex problems simple][Examples]
- [💆 seamless native integration][ExamplesPrimitives]
- [🎼 compose & decorate][compose]
- [👂 observe with Wildcard/Glob, RegExp, Functions][Observe]
- [🤖 transform][Transform]
- [🕵 debug][Shorthand]
- [👣 traverse **any** data][TraverseChain]
- [⚖️ fast deepEquals][Transform]
- [🗺 remap][Transform]
- [👆 tap][ChainedMap]
- [🔋 toggleable dot.prop][DotProp]
- [🖐 shorthands, wrap, return, setIfEmpty][Shorthand]
- [🛂 types, schemas, validation][Schema]
- [🔌 method builder][MethodChain]
- [`onCall`][MethodChain]
- [`onSet`][MethodChain]
- [`onGet`][MethodChain]
- [`type`][MethodChain]
- [`define`][MethodChain]
- [`getSet`][MethodChain]
- [`default`][MethodChain]
- [`initial`][MethodChain]
- [`bind`][MethodChain]
- [`camelCase`][MethodChain]
- [`autoIncrement`][MethodChain]
- [`factory`][MethodChain]
- [`returns`][MethodChain]
- [`callReturns`][MethodChain]
- [`decorate (any object!)`][MethodChain]
- [🏭 infinitely nestable understandable factories][FactoryChain]
- [▶️◀️ easy deep merging][MergeChain]
- [☮️ compatibility - typescript, nodejs, webpack, rollup, fusebox, babel, buble, amd][API]
- ⚡ performant & tiny `~7kb` _(gzip)_ [_300 byte_ minimal version available as snippet][snippet]-----
### 🔗 related
- [😎⛓ awesome fluents](https://github.com/fluents/awesome-fluents)
- many thanks to [Eli Perelman](https://github.com/eliperelman) for all the chainable goodness
- thanks to [James Halliday](https://github.com/substack) for the tremendous [traversals](https://github.com/substack/js-traverse)
- thanks to [Sindre Sorhus](https://github.com/sindresorhus) for the simple [dot-prop](https://github.com/sindresorhus/dot-prop) access
- thanks to [Josh Duff](https://github.com/KyleAMathews) for [deep merging](https://github.com/KyleAMathews/deepmerge)
- based on [webpack-chain](https://github.com/mozilla-rpweb/webpack-chain), but not webpack-specific.
- thanks to [Jon Schlinkert](https://github.com/jonschlinkert/kind-of) & [inferno](https://github.com/infernojs/inferno/blob/master/packages/inferno-shared/src/index.ts) for type checking inspirations
- transpiled with [buble](https://gitlab.com/Rich-Harris/buble)
- [Martin Fowler on FluentInterface](https://www.martinfowler.com/bliki/FluentInterface.html)