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

@goldfishjs/route

Package Overview
Dependencies
Maintainers
2
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@goldfishjs/route - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

2

lib/container-router/StackedRouter.js

@@ -8,4 +8,4 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";

import _inherits from "@babel/runtime/helpers/inherits";
import { parse, stringify } from 'qs';
import BaseRouter from './BaseRouter';
import { parse, stringify } from 'qs';
export function parseUrl(url) {

@@ -12,0 +12,0 @@ var urlSplit = url.split('?');

@@ -6,3 +6,3 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";

import Route from './Route';
import { TinyAppRouter as BaseTinyappRoute } from './container-router';
import { default as BaseTinyappRoute } from './container-router/TinyAppRouter';

@@ -9,0 +9,0 @@ var TinyappRoute =

{
"name": "@goldfishjs/route",
"version": "0.0.16",
"version": "0.0.17",
"description": "goldfish-route",

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

"build": "rm -rf ./types && rm -rf ./lib && gulp ts",
"lint": "tslint ./src/**",
"ci": "npm run test",
"release": "npm run test && npm run lint && npm run build && npm publish"
"release": "npm run test && npm run build && npm publish"
},

@@ -42,6 +41,3 @@ "keywords": [],

"react-dom": "^16.6.1",
"ts-jest": "^23.10.2",
"tslint": "^5.11.0",
"tslint-config-airbnb": "^5.11.0",
"typescript": "^3.7.2"
"ts-jest": "^23.10.2"
},

@@ -48,0 +44,0 @@ "types": "./types/index.d.ts",

@@ -12,3 +12,3 @@ /**

export default abstract class BaseRouter {
protected fromuKey: string = 'fromu';
protected fromuKey = 'fromu';

@@ -24,5 +24,3 @@ private path: string | null = '';

return () => {
this.changeListeners = this.changeListeners.filter((l) => {
return l !== listener;
});
this.changeListeners = this.changeListeners.filter((l) => l !== listener);
};

@@ -38,4 +36,4 @@ }

options: {
removeStackLength?: number,
params?: any,
removeStackLength?: number;
params?: any;
},

@@ -84,3 +82,3 @@ ): void;

protected setPath(path: string, silent: boolean = false) {
protected setPath(path: string, silent = false) {
if (this.path !== path) {

@@ -108,3 +106,3 @@ this.path = path;

protected setQuery(query: Query, silent: boolean = false) {
protected setQuery(query: Query, silent = false) {
if (!this.isQueryEqual(query, this.query)) {

@@ -111,0 +109,0 @@ this.query = query;

@@ -0,3 +1,3 @@

import { parse, stringify } from 'qs';
import BaseRouter, { Query } from './BaseRouter';
import { parse, stringify } from 'qs';

@@ -56,3 +56,3 @@ export interface IStackItem {

*/
public back(n: number = 1, defaultUrl: string = '/') {
public back(n = 1, defaultUrl = '/') {
if (n < 0) {

@@ -88,4 +88,4 @@ throw new Error('The back steps must be a positive integer.');

}: {
removeStackLength?: number,
params?: any,
removeStackLength?: number;
params?: any;
} = {},

@@ -92,0 +92,0 @@ ) {

import Route from './Route';
import { TinyAppRouter as BaseTinyappRoute } from './container-router';
import { default as BaseTinyappRoute } from './container-router/TinyAppRouter';

@@ -4,0 +4,0 @@ class TinyappRoute extends Route {

@@ -1,3 +0,2 @@

import { BaseRouter } from './container-router';
import { Query } from './container-router/BaseRouter';
import { Query, default as BaseRouter } from './container-router/BaseRouter';
import IRoute from './IRoute';

@@ -34,3 +33,3 @@

public back(n: number, defaultUrl: string = '') {
public back(n: number, defaultUrl = '') {
this.route.back(n, defaultUrl);

@@ -37,0 +36,0 @@ }

@@ -17,4 +17,5 @@ {

"declaration": true,
"declarationDir": "../types"
"declarationDir": "../types",
"types": ["mini-types"]
}
}
import Route from './Route';
import { TinyAppRouter as BaseTinyappRoute } from './container-router';
import { default as BaseTinyappRoute } from './container-router/TinyAppRouter';
declare class TinyappRoute extends Route {

@@ -4,0 +4,0 @@ protected route: BaseTinyappRoute;

@@ -1,3 +0,2 @@

import { BaseRouter } from './container-router';
import { Query } from './container-router/BaseRouter';
import { Query, default as BaseRouter } from './container-router/BaseRouter';
import IRoute from './IRoute';

@@ -4,0 +3,0 @@ export default abstract class Route implements IRoute {

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