shinkansen-rails
TypeScript icon, indicating that this package has built-in type declarations

1.0.154 • Public • Published

shinkansen-rails

Rails

Rails transforms objects into strings to be consumed by <Link /> components for React Router.

Usage

import {
  Rails
} from 'shinkansen-rails'

Rails exposes the methods pattern, go, to, and rail.

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

Package Sidebar

Install

npm i shinkansen-rails

Weekly Downloads

439

Version

1.0.154

License

MIT

Unpacked Size

9.34 kB

Total Files

9

Last publish

Collaborators

  • modernpoacherlimited
  • jonathanperry