redux-create-actiontype
Advanced tools
Comparing version 0.1.3 to 1.0.0
{ | ||
"name": "redux-create-actiontype", | ||
"version": "0.1.3", | ||
"version": "1.0.0", | ||
"author": "anvk", | ||
@@ -5,0 +5,0 @@ "main": "dist/redux-create-actiontype.js", |
@@ -18,9 +18,10 @@ # redux-create-actiontype [![Build Status](https://travis-ci.org/anvk/redux-create-actiontype.svg?branch=master)](https://travis-ci.org/anvk/redux-create-actiontype) | ||
```js | ||
import createActionTypes from 'redux-create-actiotype'; | ||
import createActionTypes from 'redux-create-actiontype'; | ||
const types = createActionTypes()( | ||
'login', | ||
'logout', | ||
'is fetching', | ||
'CREATE_ACTION' | ||
'LOGIN', | ||
'LOGOUT', | ||
'IS_FETCHING', | ||
'CREATE_ACTION', | ||
{ 'USER': { api: true } } | ||
); | ||
@@ -33,3 +34,6 @@ | ||
IS_FETCHING: 'IS_FETCHING', | ||
CREATE_ACTION: 'CREATE_ACTION' | ||
CREATE_ACTION: 'CREATE_ACTION', | ||
USER_FETCHING: 'USER_FETCHING', | ||
USER_SUCCESS: 'USER_SUCCESS', | ||
USER_ERROR: 'USER_ERROR' | ||
}; | ||
@@ -39,3 +43,3 @@ */ | ||
An example which is closer to a a real world project: | ||
A nested example which is closer to a real world project: | ||
@@ -58,3 +62,3 @@ ```js | ||
MY_APP_LOGOUT: 'MY_APP_LOGOUT', | ||
MY_APP_USERS_FETCH_LOADING: 'MY_APP_USERS_FETCH_LOADING', | ||
MY_APP_USERS_FETCH_FETCHING: 'MY_APP_USERS_FETCH_FETCHING', | ||
MY_APP_USERS_FETCH_SUCCESS: 'MY_APP_USERS_FETCH_SUCCESS', | ||
@@ -85,3 +89,3 @@ MY_APP_USERS_FETCH_ERROR: 'MY_APP_USERS_FETCH_ERROR', | ||
MY_APP_LOGOUT: 'MY_APP_LOGOUT', | ||
MY_APP_USER_LOADING: 'MY_APP_USER_LOADING', | ||
MY_APP_USER_FETCHING: 'MY_APP_USER_FETCHING', | ||
MY_APP_USER_SUCCESS: 'MY_APP_USER_SUCCESS', | ||
@@ -211,3 +215,3 @@ MY_APP_USER_ERROR: 'MY_APP_USER_ERROR', | ||
const defaultAPIPostfixes = [ | ||
'LOADING', | ||
'FETCHING', | ||
'ERROR', | ||
@@ -214,0 +218,0 @@ 'SUCCESS' |
@@ -14,3 +14,3 @@ const UNDERSCORE = '_'; | ||
const defaultAPIPostfixes = [ | ||
'LOADING', | ||
'FETCHING', | ||
'ERROR', | ||
@@ -17,0 +17,0 @@ 'SUCCESS' |
@@ -119,3 +119,3 @@ import { expect } from 'chai'; | ||
'USERS_FORM_CHANGE': 'USERS_FORM_CHANGE', | ||
'USERS_LOGIN_LOADING': 'USERS_LOGIN_LOADING', | ||
'USERS_LOGIN_FETCHING': 'USERS_LOGIN_FETCHING', | ||
'USERS_LOGIN_SUCCESS': 'USERS_LOGIN_SUCCESS', | ||
@@ -194,3 +194,3 @@ 'USERS_LOGIN_ERROR': 'USERS_LOGIN_ERROR' | ||
'USERS_DIALOG_FORM_SUBMIT_ERROR': 'USERS_DIALOG_FORM_SUBMIT_ERROR', | ||
'USERS_DIALOG_FORM_SUBMIT_LOADING': 'USERS_DIALOG_FORM_SUBMIT_LOADING', | ||
'USERS_DIALOG_FORM_SUBMIT_FETCHING': 'USERS_DIALOG_FORM_SUBMIT_FETCHING', | ||
'USERS_DIALOG_FORM_SUBMIT_SUCCESS': 'USERS_DIALOG_FORM_SUBMIT_SUCCESS' | ||
@@ -215,3 +215,3 @@ }); | ||
MY_APP_LOGOUT: 'MY_APP_LOGOUT', | ||
MY_APP_USERS_FETCH_LOADING: 'MY_APP_USERS_FETCH_LOADING', | ||
MY_APP_USERS_FETCH_FETCHING: 'MY_APP_USERS_FETCH_FETCHING', | ||
MY_APP_USERS_FETCH_SUCCESS: 'MY_APP_USERS_FETCH_SUCCESS', | ||
@@ -218,0 +218,0 @@ MY_APP_USERS_FETCH_ERROR: 'MY_APP_USERS_FETCH_ERROR', |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
27936
0
225