All Projects → nikaspran → Fluent.js

nikaspran / Fluent.js

Tiny library for building fluent interfaces in JavaScript

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Fluent.js

FluentInterfaceCreator
Tool to create fluent interface files
Stars: ✭ 58 (+56.76%)
Mutual labels:  fluent-interface
windows-ui-web
Build windows fluent UI apps or web apps using Html, CSS & JavaScript. Comes with rich native like components, icon sets. Used as fast prototyping tool for Windows environment platforms.
Stars: ✭ 98 (+164.86%)
Mutual labels:  fluent-interface
Validation
The most awesome validation engine ever created for PHP
Stars: ✭ 5,484 (+14721.62%)
Mutual labels:  fluent-interface
ugo
Simple and expressive toolbox written in Go
Stars: ✭ 27 (-27.03%)
Mutual labels:  fluent-interface
csvplus
csvplus extends the standard Go encoding/csv package with fluent interface, lazy stream operations, indices and joins.
Stars: ✭ 67 (+81.08%)
Mutual labels:  fluent-interface
csharp-http-client
Twilio SendGrid's C# HTTP Client for calling APIs
Stars: ✭ 25 (-32.43%)
Mutual labels:  fluent-interface
Fluent Reveal Effect
Fluent Reveal Effect JavaScript library for web
Stars: ✭ 164 (+343.24%)
Mutual labels:  fluent-interface
With
With provides object like fluent interface for scalars and non-objects
Stars: ✭ 14 (-62.16%)
Mutual labels:  fluent-interface
php-currency-api
Standardized wrapper for popular currency rate APIs. Currently supports FixerIO, CurrencyLayer, Open Exchange Rates and Exchange Rates API.
Stars: ✭ 17 (-54.05%)
Mutual labels:  fluent-interface
Pnp Js Core
Code moved to https://github.com/pnp/pnpjs. This repository is archived.
Stars: ✭ 382 (+932.43%)
Mutual labels:  fluent-interface
1c http
Подсистема 1С для работы с HTTP
Stars: ✭ 48 (+29.73%)
Mutual labels:  fluent-interface
fluentcheck
Fluent assertions for Python
Stars: ✭ 79 (+113.51%)
Mutual labels:  fluent-interface
Acf Fluent
✒️ A fluent interface for the Advanced Custom Fields WordPress plugin
Stars: ✭ 264 (+613.51%)
Mutual labels:  fluent-interface
SwiftBuilder
SwiftBuilder is a fast way to assign new value to the property of the object.
Stars: ✭ 26 (-29.73%)
Mutual labels:  fluent-interface
Chainly
Make any .NET object a fluent interface regardless if you have the source code or not!
Stars: ✭ 19 (-48.65%)
Mutual labels:  fluent-interface
Filehound
Flexible and fluent interface for searching the file system
Stars: ✭ 190 (+413.51%)
Mutual labels:  fluent-interface
php-underscore
PHP underscore inspired &/or cloned from _.js, with extra goodies like higher order messaging
Stars: ✭ 42 (+13.51%)
Mutual labels:  fluent-interface
Fluent
Python wrapper for stdlib (and other) objects to give them a fluent interface.
Stars: ✭ 32 (-13.51%)
Mutual labels:  fluent-interface
Rumble 4 Android
Dead simple Android library for API independant Vibration functionality with fluent interface.
Stars: ✭ 26 (-29.73%)
Mutual labels:  fluent-interface
Thumbnailator
Thumbnailator - a thumbnail generation library for Java
Stars: ✭ 3,845 (+10291.89%)
Mutual labels:  fluent-interface

fluent.js Build Status

A tiny library for building fluent interfaces in JavaScript

Installation

npm install fluent.js --save

Usage

Simple functions

var fluent = require('fluent.js');

var insert = fluent({
  insert: '*',
  into: '[]',
  after: '*'
}, function handler(value, array, otherValue) {
  array.splice(array.indexOf(otherValue) + 1, 0, value);
  return array;
});

console.log(insert(2).into([1, 3]).after(1)); //[1, 2, 3]

Extending objects (and prototypes)

var fluent = require('fluent.js');

fluent({
  with: '*',
  after: '*'
}, function handler(value, otherValue) {
  var copy = this.slice(0);		
  copy.splice(copy.indexOf(otherValue) + 1, 0, value);		
  return copy;
}, Array.prototype);

console.log(['this', 'awesome'].with('is').after('this')); //['this', 'is', 'awesome']

TODO

  • Argument validation
  • ES6 object destructuring
  • Branching functions
  • ???

Contributing

Make sure gulp build passes, otherwise try to maintain similar code style.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].