Socket
Socket
Sign inDemoInstall

react-router-query-params

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router-query-params - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

es/index.js

@@ -30,4 +30,2 @@ import _defineProperty from 'babel-runtime/helpers/defineProperty';

_Object$keys(keys).forEach(function (key) {
assert(keys[key].default, 'Missing default value for key ' + key);
assert(typeof keys[key].default === 'string' || typeof keys[key].default === 'function', '\'default\' for key ' + key + ' must be a string or a function');
assert(keys[key].validate, 'Missing validate function for key ' + key);

@@ -34,0 +32,0 @@ assert(typeof keys[key].validate === 'function', '\'validate\' for ' + key + ' must be a function');

@@ -76,4 +76,2 @@ 'use strict';

(0, _keys2.default)(keys).forEach(function (key) {
(0, _utils.assert)(keys[key].default, 'Missing default value for key ' + key);
(0, _utils.assert)(typeof keys[key].default === 'string' || typeof keys[key].default === 'function', '\'default\' for key ' + key + ' must be a string or a function');
(0, _utils.assert)(keys[key].validate, 'Missing validate function for key ' + key);

@@ -80,0 +78,0 @@ (0, _utils.assert)(typeof keys[key].validate === 'function', '\'validate\' for ' + key + ' must be a function');

2

package.json
{
"name": "react-router-query-params",
"version": "1.0.1",
"version": "1.0.2",
"description": "Set query parameters with a schema for react-router.",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -92,3 +92,3 @@ # react-router-query-params

* __`default`__ (string|function): Define the default value for the query parameter. If query parameter valiation fails or it is undefined, the HoC automatically sets the query parameter to this value. Examples:
* __`default`__ (any): Define the default value for the query parameter. If query parameter valiation fails or it is undefined, the HoC automatically sets the query parameter to this value. Examples:
- `default: 'example'`: sets 'example' as default value

@@ -95,0 +95,0 @@ - `default: (value, props) => props.defaultParam'`: sets `defaultParam` from the component props as default value

@@ -20,7 +20,2 @@ import React, { PureComponent } from 'react';

Object.keys(keys).forEach((key) => {
assert(keys[key].default, `Missing default value for key ${key}`);
assert(
typeof keys[key].default === 'string' || typeof keys[key].default === 'function',
`'default' for key ${key} must be a string or a function`,
);
assert(keys[key].validate, `Missing validate function for key ${key}`);

@@ -27,0 +22,0 @@ assert(typeof keys[key].validate === 'function', `'validate' for ${key} must be a function`);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc