@teamleader/ddd-action-string

0.1.1 • Public • Published

@teamleader/ddd-action-string npm version

Helpers to create domain-driven design (DDD) inspired action strings for Redux

Installation

NPM

npm i @teamleader/ddd-action-string

Yarn

yarn add @teamleader/ddd-action-string

Usage Example

import {
  createApplicationActionString,
  createDomainActionString,
  createRequestActionStrings,
} from '@teamleader/ddd-action-string';

createApplicationActionString({
  organisation: 'teamleader',
  application: 'calendar',
  domain: 'routing/calendars',
  action: 'goto_today',
});

// 'Teamleader/Calendar/Application/Routing/Calendars/GOTO_TODAY'

createDomainActionString({
  organisation: 'teamleader',
  domain: 'events',
  action: 'initialize',
});

// 'Teamleader/Domain/Events/INITIALIZE'

createRequestActionStrings({
  organisation: 'teamleader',
  domain: 'events',
  action: 'list',
});

/*
  [
    'Teamleader/Domain/Events/LIST_REQUEST',
    'Teamleader/Domain/Events/LIST_SUCCESS',
    'Teamleader/Domain/Events/LIST_FAILURE'
  ]
*/

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @teamleader/ddd-action-string

Weekly Downloads

3

Version

0.1.1

License

MIT

Unpacked Size

6.73 kB

Total Files

9

Last publish

Collaborators

  • beirlaenaaron
  • stefaandevylder
  • kristofcolpaert
  • eniskraasniqi
  • farazatarodi
  • jelledc
  • qubis741
  • teamleader-guild
  • driesd
  • wielo
  • lorgan3
  • jorensaeytl