New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

think-router

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

think-router - npm Package Compare versions

Comparing version 1.0.13 to 1.0.14

2

package.json
{
"name": "think-router",
"description": "Router for ThinkJS",
"version": "1.0.13",
"version": "1.0.14",
"author": {

@@ -6,0 +6,0 @@ "name": "welefen",

@@ -132,2 +132,3 @@ const helper = require('think-helper');

query[queryItem.name] = match[index + 1];
pathname = pathname.replace(`:${queryItem.name}`, query[queryItem.name]);
}

@@ -134,0 +135,0 @@ });

@@ -5,3 +5,3 @@ /*

* @Last Modified by: lushijie
* @Last Modified time: 2017-07-23 10:31:45
* @Last Modified time: 2017-07-23 17:12:32
*/

@@ -1036,1 +1036,25 @@ import test from 'ava';

});
test.serial.cb('routerChange', t => {
let options = helper.extend({}, defaultOptions);
let ctx = helper.extend({}, defaultCtx, {
path: ''
});
let app = helper.extend({}, defaultApp, {
modules: ['admin', 'home'],
on: function(event, cb) {
//cb();
cb(['^\/admin\/article\/list', 'admin/article/list', 'get']);
}
});
ctx.app = app;
parseRouter(options, app)(ctx, next).then(data => {
t.deepEqual(RESULT, {
module: 'home',
controller: 'index',
action: 'index'
});
t.end();
});
});
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