
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
action-types
Advanced tools
Conveniently create action types with multi-level namespace support.
A note about compatibility
The npm package should be used in an ES6 environment. Even though the published code has ES5 syntax it uses some ES6 features, so you have to make sure to use ES5 and ES6 polyfills if you are in an ancient environment.
npm install action-types
import { ActionType, createActionTypes } from './action-types'
createActionTypes({
START_APP: ActionType,
user: {
ADD: ActionType,
REMOVE: ActionType,
current: {
SET: ActionType,
CHANGE: ActionType
}
}
})
// results in:
{
START_APP: 'START_APP',
user: {
ADD: 'user.ADD',
REMOVE: 'user.REMOVE',
CHANGE: 'user.CHANGE',
current: {
SET: 'user.current.SET',
CHANGE: 'user.current.CHANGE'
}
}
}
import { ActionType, createActionTypes } from './action-types'
createActionTypes({
ADD: ActionType,
REMOVE: ActionType
}, {
namespace: 'user'
})
// results in:
{
ADD: 'user.ADD',
REMOVE: 'user.REMOVE'
}
import { ActionType, createActionTypes } from './action-types'
createActionTypes({
user: {
ADD: ActionType,
REMOVE: ActionType
}
}, {
separator: '::'
})
// results in:
{
ADD: 'user::ADD',
REMOVE: 'user::REMOVE'
}
npm test
FAQs
Conveniently create action types with nested namespace support.
The npm package action-types receives a total of 5 weekly downloads. As such, action-types popularity was classified as not popular.
We found that action-types demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.