https://github.com/raineorshine/unfluent
Args parser/parser wrapper with alternative syntax
https://github.com/raineorshine/unfluent
Last synced: 6 days ago
JSON representation
Args parser/parser wrapper with alternative syntax
- Host: GitHub
- URL: https://github.com/raineorshine/unfluent
- Owner: raineorshine
- License: isc
- Created: 2021-01-21T19:03:31.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-09T13:43:28.000Z (over 4 years ago)
- Last Synced: 2025-03-10T15:09:33.296Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 61.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# unfluent
[](https://npmjs.org/package/unfluent)A simple wrapper that calls a Fluent Interface with a configuration object.
> In software engineering, a fluent interface is an object-oriented API whose design relies extensively on method chaining. Its goal is to increase code legibility by creating a domain-specific language (DSL).
**Why bad?**
- Javascript has a native object literal syntax (JSON) that is just as DSL-like
- JSON is serializable
- Method chaining obscures mutations## Install
```sh
npm install --save unfluent
```## Usage
```js
const commander = require('commander')
const unfluent = require('unfluent')unfluent(commander, {
options: [
['--d, -d', 'do something']
],
})
```