⛓ chain-able
interfaces that describe their intentions
📦 install
yarn add chain-able
npm i chain-able --save
cdn
- dev
<script src="https://unpkg.com/chain-able@beta/dists/dev/index.js"></script> - min
<script src="https://unpkg.com/chain-able@beta/dists/umd/index.js"></script>
🏰 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
- runtime type validation
- 🔬 300+ tests with 96%+ code coverage
- ⚡ performant & tiny
~8kb(gzip) 300 byte minimal version available as snippet
more...
- 🌐 api
- 🍭 iteratable
- 🗣 expressive
- 👾 makes solving complex problems simple
- 💆 seamless native integration
- 🎼 compose & decorate
- 🛂 types, schemas, validation
- 🔌 method builder
- 🏭 infinitely nestable understandable factories
- ▶️◀️ easy deep merging
- ☮️ compatibility - typescript, nodejs, webpack, rollup, fusebox, babel, buble, amd
🔗 related
- 😎⛓ awesome fluents
- many thanks to Eli Perelman for all the chainable goodness
- thanks to James Halliday for the tremendous traversals
- thanks to Sindre Sorhus for the simple dot-prop access
- thanks to Josh Duff for deep merging
- based on webpack-chain, but not webpack-specific.
- thanks to Jon Schlinkert & inferno for type checking inspirations
- transpiled with buble
- Martin Fowler on FluentInterface
- ramda & lodash for some well tested & documented utilities (currying, mapping)
├─Chainable├─ChainedMap├─ChainedMapBase├─ChainedSet├─FactoryChain├─MergeChain├─MethodChain├─TraverseChain├─compose│├─DotProp│├─Observe│├─Shorthands│├─Transform│├─compose│├─decorators│└─index├─deps│├─argumentor│├─array││├─insertAtIndex││└─uniq│├─cache││├─index││├─pooler││└─scoped│├─concat│├─conditional││├─all││├─and││├─eq││├─eqeq││├─includes│││├─all│││├─any│││├─includes│││└─index││├─not││├─or││└─some│├─define│├─dopemerge││├─dopemerge││├─emptyTarget││├─index││└─map│├─dot││├─delete││├─dot-prop││├─dottable││├─escape││├─get││├─has││├─index││├─paths││├─segments││└─set│├─encase││├─encase││├─index││├─tryCatch││└─withSpecification│├─env││├─debug││└─dev│├─fp││├─always││├─arity││├─callDestructure││├─constructInit││├─curry││├─first││├─firstIndex││├─fp││├─index││├─isPlaceholder││├─last││├─lastIndex││├─mapWhere││├─path││├─pipe││├─prop││├─remove││└─replace│├─gc│├─ignored│├─index│├─is││├─JSON││├─arguments││├─array││├─arrayOf││├─async││├─asyncish││├─boolean││├─buffer││├─class││├─date││├─dot││├─empty││├─enumerable││├─error││├─false││├─function││├─generator││├─hasIn││├─in││├─index││├─iteratable││├─iterator││├─map││├─mapish││├─matcher││├─native││├─nodejs││├─notEmptyArray││├─notNested││├─notRealOrIsEmpty││├─null││├─nullOrUndefined││├─number││├─numberPrimitive││├─obj││├─objNotNull││├─objPure││├─objTypeof││├─objWithKeys││├─primitive││├─promise││├─prototypeOf││├─real││├─regexp││├─set││├─string││├─stringOrNumber││├─stringPrimitive││├─symbol││├─toS││├─true││└─undefined│├─matcher││├─any-key-val││├─escape-string-regex││├─index││├─matcher││├─to-regexp││└─to-test│├─meta││├─decorated││├─enums││├─index││├─keymap││├─meta││├─observers││├─shorthands││└─transformers│├─reduce││├─clean││├─entries││├─index││├─reduce││└─toObj│├─string││├─camelCase││├─class-names││└─prefix│├─symbols││├─index││├─instance││├─iterator││├─primitive││├─species││└─spreadable│├─to-arr│├─traverse│├─traversers││├─_eq││├─copy││├─eq││├─eqValue││├─eqdeep││├─stringify││└─traverse-comments│├─util││├─assign││├─charCodeAtZero││├─flatten││├─from││├─getDescriptor││├─getPrototypeOf││├─hasOwnProperty││├─keys││├─keysObjOrArray││├─keywords││├─length││├─lengthFromZero││├─lengthMinusOne││├─nonEnumerableTypes││├─noop││├─props││├─simpleKindOf││└─typeof│└─validators│├─error│├─index│├─schemaBuilder│└─validatorBuilder├─index├─index│└─index.js├─plugins│├─autoGetSet│├─autoIncrement│├─decorate│├─encase│├─getterOnSet│├─index│├─merge│├─obj│├─plugins│├─schema│└─types└─dists└─dev└─index