1.1.2 • Published 7 years ago

scope-types v1.1.2

Weekly downloads
4
License
GPL-3.0
Repository
github
Last release
7 years ago

Scope Types

Helper function for scoping a list of action types.

Build Status Coverage Status Dependency Status devDependency Status JavaScript Style Guide

Installation

Using npm:
$ npm install scope-types

Using yarn:
$ yarn add scope-types

Usage

/* actionTypes.js */
import scopeTypes from 'scope-types'

const types = ['MY_WILD_TYPE', 'MY_SWELL_TYPE', 'MY_SLICK_TYPE']
const customScope = 'myThrillingScope'
const actionTypes = scopeTypes(types, customScope)

/*
actionTypes = {
  MY_WILD_TYPE: Symbol('myThrillingScope/MY_WILD_TYPE'),
  MY_SWELL_TYPE: Symbol('myThrillingScope/MY_SWELL_TYPE')
  MY_SLICK_TYPE: Symbol('myThrillingScope/MY_SLICK_TYPE')
}
*/

export default actionTypes

Usage With Redux Logger

If you are planning on using with Redux Logger be sure to look at this issue.

1.1.2

7 years ago

1.1.1

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago