react-querystring-router
Advanced tools
Comparing version 2.0.0 to 3.0.0-alpha.2
@@ -7,6 +7,14 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); | ||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); | ||
var _createClass2 = require('babel-runtime/helpers/createClass'); | ||
var _createClass3 = _interopRequireDefault(_createClass2); | ||
var _react = require('react'); | ||
@@ -24,4 +32,2 @@ | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var getCurrentLocation = function getCurrentLocation() { | ||
@@ -33,3 +39,3 @@ return window.location.href; | ||
function Router(options) { | ||
_classCallCheck(this, Router); | ||
(0, _classCallCheck3.default)(this, Router); | ||
@@ -47,3 +53,3 @@ this.options = options; | ||
_createClass(Router, [{ | ||
(0, _createClass3.default)(Router, [{ | ||
key: 'stop', | ||
@@ -103,3 +109,3 @@ value: function stop() { | ||
var ComponentClass = getComponentClass(params); | ||
var props = _extends({}, getComponentProps(params), { | ||
var props = (0, _extends3.default)({}, getComponentProps(params), { | ||
// Always send the components a reference to the router. This makes it | ||
@@ -120,3 +126,2 @@ // possible for a component to change the page through the router and | ||
}]); | ||
return Router; | ||
@@ -123,0 +128,0 @@ }(); |
'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var _typeof2 = require('babel-runtime/helpers/typeof'); | ||
var _typeof3 = _interopRequireDefault(_typeof2); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
module.exports = { | ||
@@ -53,3 +57,3 @@ parseLocation: function parseLocation(location) { | ||
// Objects can be embedded in a query string as well | ||
if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') { | ||
if ((typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) === 'object') { | ||
try { | ||
@@ -56,0 +60,0 @@ value = JSON.stringify(value); |
{ | ||
"name": "react-querystring-router", | ||
"version": "2.0.0", | ||
"version": "3.0.0-alpha.2", | ||
"description": "Bare router for React components, using props as query string", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/react-cosmos/react-cosmos/tree/master/packages/react-querystring-router", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
158
7621
2