@nofrills/patterns
Provides some common pattern abstractions.
Last updated 2 months ago by teegee .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @nofrills/patterns 
SYNC missed versions from official npm registry.

@nofrills/patterns

npm

Install

npm install --save @nofrills/patterns

yarn add @nofrills/patterns

Patterns

Library to implement some common abstract patterns that occasionally useful in your day to day tasks. There are some design patterns as well as just general abstract patterns not associated with the 23 well-known design patterns.

[DESIGN] Chain of Responsiblity

Chain<T> and ChainAsync<T> are implementations of the chain of responsibility pattern. You can add as many handlers as you want before calling execute, which can either execute inside-out or outside-in order.

const handlers = [
  (input: string, next) => next()
]
const chains = Chains.from<string, string>(handlers)
chains.execute({})

License

Copyright 2018 NativeCode Development opensource@nativecode.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Current Tags

  • 10.0.2                                ...           latest (2 months ago)
  • 10.0.2-next.1                                ...           next (2 months ago)

32 Versions

  • 10.0.2                                ...           2 months ago
  • 10.0.2-next.1                                ...           2 months ago
  • 10.0.1                                ...           8 months ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.8                                ...           a year ago
  • 2.0.7                                ...           a year ago
  • 2.0.6                                ...           a year ago
  • 2.0.5                                ...           a year ago
  • 2.0.4                                ...           a year ago
  • 2.0.3                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.5.7                                ...           a year ago
  • 1.5.6                                ...           a year ago
  • 1.5.5                                ...           a year ago
  • 1.5.4                                ...           a year ago
  • 1.5.3                                ...           a year ago
  • 1.5.0                                ...           2 years ago
  • 1.4.4                                ...           2 years ago
  • 1.4.3                                ...           2 years ago
  • 1.4.2                                ...           2 years ago
  • 1.4.1                                ...           2 years ago
  • 1.4.0                                ...           2 years ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |