Shinkansen Rails
npm install shinkansen-railsshinkansen-railsRails transforms objects into strings to be consumed by components for React Router.
``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 patterngo
- returns a boolean which describes whether an object can be transformed by the patternto
- returns a string which is the product of that transformationrail
- caches and returns a product of to
The method rail` should be used whenever the computation is (or expected to be) idempotent.
- Gears
- Pantograph