@ditojs/router
Advanced tools
Comparing version 0.79.0 to 0.80.0
@@ -7,2 +7,5 @@ "use strict"; | ||
exports.default = void 0; | ||
var _utils = require("@ditojs/utils"); | ||
const TYPE_STATIC = 0; | ||
@@ -93,3 +96,3 @@ const TYPE_PARAM = 1; | ||
while (true) { | ||
const pos = current.matchPrefix(path); | ||
const pos = (0, _utils.getCommonOffset)(current.prefix, path); | ||
const { | ||
@@ -163,3 +166,3 @@ prefix | ||
const pos = this.matchPrefix(path); | ||
const pos = (0, _utils.getCommonOffset)(this.prefix, path); | ||
const prefixLength = prefix.length; | ||
@@ -218,18 +221,2 @@ const fullMatch = pos === prefixLength; | ||
matchPrefix(path) { | ||
const { | ||
prefix | ||
} = this; | ||
const prefixLength = prefix.length; | ||
const pathLength = path.length; | ||
const max = pathLength < prefixLength ? pathLength : prefixLength; | ||
let pos = 0; | ||
while (pos < max && path.charCodeAt(pos) === prefix.charCodeAt(pos)) { | ||
pos++; | ||
} | ||
return pos; | ||
} | ||
toString(prefix = '', tail = true, root = true) { | ||
@@ -256,2 +243,2 @@ const handler = this.handler && `${this.handler.name || 'ƒ'}()`; | ||
exports.default = Node; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9Ob2RlLmpzIl0sIm5hbWVzIjpbIlRZUEVfU1RBVElDIiwiVFlQRV9QQVJBTSIsIlRZUEVfTUFUQ0hfQU5ZIiwiQ0hBUl9QQVJBTSIsImNoYXJDb2RlQXQiLCJDSEFSX01BVENIX0FOWSIsIkNIQVJfU0xBU0giLCJOb2RlIiwiY29uc3RydWN0b3IiLCJhcmdzIiwiaW5pdGlhbGl6ZSIsInByZWZpeCIsInR5cGUiLCJjaGlsZHJlbiIsImhhbmRsZXIiLCJwYXJhbU5hbWVzIiwibGFiZWwiLCJwYXJhbU5hbWUiLCJhZGRDaGlsZCIsImNoaWxkIiwicHVzaCIsImZpbmRDaGlsZCIsImZpbmRDa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3Qgc3RyID0gZm9ybWF0KHByZWZpeCwgdGFpbCwgJyAgICAnLCAn4pSCICAgJylcbiAgICBmb3IgKGxldCBpID0gMCwgbCA9IGNoaWxkcmVuLmxlbmd0aCAtIDE7IGkgPD0gbDsgaSsrKSB7XG4gICAgICBsaW5lcy5wdXNoKGNoaWxkcmVuW2ldLnRvU3RyaW5nKHN0ciwgaSA9PT0gbCwgZmFsc2UpKVxuICAgIH1cbiAgICByZXR1cm4gbGluZXMuam9pbignXFxuJylcbiAgfVxufVxuIl19 |
{ | ||
"name": "@ditojs/router", | ||
"version": "0.79.0", | ||
"version": "0.80.0", | ||
"description": "Dito.js Router – Dito.js is a declarative and modern web framework, based on Objection.js, Koa.js and Vue.js", | ||
@@ -29,3 +29,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@ditojs/utils": "^0.79.0" | ||
"@ditojs/utils": "^0.80.0" | ||
}, | ||
@@ -39,3 +39,3 @@ "keywords": [ | ||
], | ||
"gitHead": "3f28caaa0aa6244f1eb3f7961c903023082c77d2" | ||
"gitHead": "6f224c13d4ec72a7ffac453bcbe76ff6cd7cb0f5" | ||
} |
@@ -0,1 +1,3 @@ | ||
import { getCommonOffset } from '@ditojs/utils' | ||
// Node Types: | ||
@@ -94,3 +96,3 @@ const TYPE_STATIC = 0 | ||
// Find the position where the path and the node's prefix start diverging. | ||
const pos = current.matchPrefix(path) | ||
const pos = getCommonOffset(current.prefix, path) | ||
const { prefix } = current | ||
@@ -158,3 +160,3 @@ if (pos < prefix.length) { | ||
const pos = this.matchPrefix(path) | ||
const pos = getCommonOffset(this.prefix, path) | ||
const prefixLength = prefix.length | ||
@@ -213,14 +215,2 @@ const fullMatch = pos === prefixLength | ||
matchPrefix(path) { | ||
const { prefix } = this | ||
const prefixLength = prefix.length | ||
const pathLength = path.length | ||
const max = pathLength < prefixLength ? pathLength : prefixLength | ||
let pos = 0 | ||
while (pos < max && path.charCodeAt(pos) === prefix.charCodeAt(pos)) { | ||
pos++ | ||
} | ||
return pos | ||
} | ||
toString(prefix = '', tail = true, root = true) { | ||
@@ -227,0 +217,0 @@ const handler = this.handler && `${this.handler.name || 'ƒ'}()` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
164687
1697