Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/modernpoacher/shinkansen-rails
Rails for Zashiki Karakuri
https://github.com/modernpoacher/shinkansen-rails
Last synced: 7 days ago
JSON representation
Rails for Zashiki Karakuri
- Host: GitHub
- URL: https://github.com/modernpoacher/shinkansen-rails
- Owner: modernpoacher
- Created: 2016-11-16T10:57:13.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-04-13T03:22:10.000Z (7 months ago)
- Last Synced: 2024-04-14T10:16:06.526Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 3.45 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## `shinkansen-rails`
# Rails
*Rails* transforms objects into strings to be consumed by `` components for *React Router*.
## Usage
```javascript
import {
Rails
} from 'shinkansen-rails'
```*Rails* exposes the methods `pattern`, `go`, `to`, and `rail`.
```javascript
export class Rails {
static pattern () { }
static go () { }
static to () { }
static rail () { }
}
```- `pattern` returns a string which is the transformation pattern
- `go` returns a boolean which describes whether an object can be transformed by the pattern
- `to` returns a string which is the product of that transformation
- `rail` caches and returns a product of `to`The method `rail` should be used whenever the computation is (or expected to be) idempotent.
## See also
- [Gears](https://github.com/modernpoacher/shinkansen-gears)
- [Pantograph](https://github.com/modernpoacher/shinkansen-pantograph)