@teamleader/ddd-action-string
v0.1.1
Published
Helpers to create domain-driven design (DDD) inspired action strings for Redux
Downloads
13
Maintainers
Keywords
Readme
@teamleader/ddd-action-string
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'
]
*/