Socket
Socket
Sign inDemoInstall

trouter

Package Overview
Dependencies
1
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.2.1 to 4.0.0

license

2

index.d.ts

@@ -9,3 +9,3 @@ // Thank you: @fwilkerson, @stahlstift

export default class Trouter<T = Function> {
export class Trouter<T = Function> {
find(method: Methods, url: string): {

@@ -12,0 +12,0 @@ params: Record<string, string>;

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

const parse = require('regexparam');
const { parse } = require('regexparam');

@@ -16,3 +16,3 @@ const MAP = {

module.exports = class Trouter {
class Trouter {
constructor() {

@@ -74,1 +74,3 @@ this.routes = [];

}
exports.Trouter = Trouter;
{
"name": "trouter",
"version": "3.2.1",
"version": "4.0.0",
"repository": "lukeed/trouter",

@@ -10,2 +10,10 @@ "description": "🐟 A fast, small-but-mighty, familiar ~fish~ router",

"license": "MIT",
"exports": {
".": {
"types": "./index.d.ts",
"import": "./index.mjs",
"require": "./index.js"
},
"./package.json": "./package.json"
},
"files": [

@@ -27,3 +35,3 @@ "index.js",

"prepack": "bundt index.mjs",
"test": "tape -r esm test/*.js | tap-spec"
"test": "uvu -r esm test"
},

@@ -36,10 +44,9 @@ "keywords": [

"dependencies": {
"regexparam": "^1.3.0"
"regexparam": "^3.0.0"
},
"devDependencies": {
"bundt": "1.1.2",
"esm": "3.2.22",
"tap-spec": "5.0.0",
"tape": "4.11.0"
"esm": "3.2.25",
"uvu": "0.5.1"
}
}

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

# trouter [![Build Status](https://badgen.now.sh/travis/lukeed/trouter)](https://travis-ci.org/lukeed/trouter)
# trouter [![CI](https://github.com/lukeed/trouter/actions/workflows/ci.yml/badge.svg)](https://github.com/lukeed/trouter/actions/workflows/ci.yml)

@@ -16,3 +16,3 @@ > 🐟 A fast, small-but-mighty, familiar ~fish~ router

```js
import Trouter from 'trouter';
import { Trouter } from 'trouter';

@@ -84,2 +84,3 @@ const router = new Trouter();

* any match / wildcards (`/users/*`)
* optional wildcards (`/users/*?`)

@@ -86,0 +87,0 @@ #### ...handlers

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc