Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-querystring-router

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-querystring-router - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0-alpha.2

21

lib/router.js

@@ -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",

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