redux-supermodel
Advanced tools
Comparing version 0.17.0 to 0.18.0
@@ -32,2 +32,18 @@ 'use strict'; | ||
function dispatchCreator() { | ||
if (arguments.length === 1 && _typeof(arguments.length <= 0 ? undefined : arguments[0]) === 'object') { | ||
return createResources(arguments.length <= 0 ? undefined : arguments[0]); | ||
} | ||
return createResource.apply(undefined, arguments); | ||
} | ||
function createResources(hash) { | ||
return Object.keys(hash).reduce(function (memo, name) { | ||
var definitionOptions = hash[name]; | ||
memo[name] = createResource(name, definitionOptions === true ? {} : definitionOptions); | ||
return memo; | ||
}, {}); | ||
} | ||
function createResource(name) { | ||
@@ -50,4 +66,4 @@ var definitionOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
createResource.baseUrl = baseUrl; | ||
createResource.createCollection = function (nm) { | ||
dispatchCreator.baseUrl = baseUrl; | ||
dispatchCreator.createCollection = function (nm) { | ||
var dopts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
@@ -59,3 +75,3 @@ | ||
return createResource; | ||
return dispatchCreator; | ||
} |
{ | ||
"name": "redux-supermodel", | ||
"version": "0.17.0", | ||
"version": "0.18.0", | ||
"description": "A package of action creator functions and reducers that deal with the state management of REST-like APIs for you... all you need is a URL!", | ||
@@ -10,3 +10,3 @@ "repository": "https://github.com/MrLeebo/redux-supermodel", | ||
"prepublish": "npm run build", | ||
"test": "nyc --require babel-core/register --require babel-polyfill mocha -u bdd-lazy-var/rspec --recursive --reporter dot --compilers jsx:babel-core/register --require ./test/setup.js test", | ||
"test": "nyc --require babel-core/register --require babel-polyfill mocha -u bdd-lazy-var/rspec --recursive --reporter dot --exit --require babel-core/register --require ./test/setup.js test", | ||
"lint": "eslint lib test || true" | ||
@@ -26,3 +26,3 @@ }, | ||
"babel-cli": "^6.26.0", | ||
"babel-eslint": "^7.2.3", | ||
"babel-eslint": "^8.0.1", | ||
"babel-plugin-transform-async-to-generator": "^6.24.1", | ||
@@ -37,24 +37,25 @@ "babel-plugin-transform-object-rest-spread": "^6.26.0", | ||
"bdd-lazy-var": "^1.3.0", | ||
"body-parser": "^1.17.2", | ||
"enzyme": "^2.9.1", | ||
"eslint": "^4.6.1", | ||
"body-parser": "^1.18.2", | ||
"enzyme": "^3.1.0", | ||
"enzyme-adapter-react-16": "^1.0.1", | ||
"eslint": "^4.8.0", | ||
"eslint-config-standard": "^10.2.1", | ||
"eslint-plugin-import": "^2.7.0", | ||
"eslint-plugin-node": "^5.1.1", | ||
"eslint-plugin-node": "^5.2.0", | ||
"eslint-plugin-promise": "^3.5.0", | ||
"eslint-plugin-react": "^7.3.0", | ||
"eslint-plugin-react": "^7.4.0", | ||
"eslint-plugin-standard": "^3.0.1", | ||
"express": "^4.15.4", | ||
"jsdom": "^11.2.0", | ||
"mocha": "^3.5.0", | ||
"express": "^4.16.2", | ||
"jsdom": "^11.3.0", | ||
"mocha": "^4.0.1", | ||
"mock-require": "^2.0.2", | ||
"nyc": "^11.2.0", | ||
"prop-types": "^15.5.10", | ||
"react": "^15.6.1", | ||
"react-dom": "^15.6.1", | ||
"nyc": "^11.2.1", | ||
"prop-types": "^15.6.0", | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0", | ||
"react-redux": "^5.0.6", | ||
"react-test-renderer": "^15.6.1", | ||
"react-test-renderer": "^16.0.0", | ||
"redux": "^3.7.2", | ||
"redux-promise-middleware": "^4.4.1", | ||
"sinon": "^3.2.1" | ||
"sinon": "^4.0.1" | ||
}, | ||
@@ -61,0 +62,0 @@ "dependencies": { |
@@ -130,4 +130,2 @@ # redux-supermodel | ||
For the full list of options, see [bindResource](docs/bindResource.md). | ||
## Installation | ||
@@ -134,0 +132,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
194629
20
668
34
150