Comparing version 0.1.2 to 0.2.0
19
index.js
@@ -188,16 +188,5 @@ "use strict"; | ||
exports.Store = Store; | ||
// const paths = [ | ||
// 'Foo', | ||
// 'ab/c', | ||
// 'ab/cd/k', | ||
// 'abx', | ||
// 'abx/:id' | ||
// // 'a:foo(\\d+)Xk', | ||
// // 'a/([abc])?/(.)?', | ||
// // ':foo,:bar' | ||
// ] | ||
// const store = new Store() | ||
// paths.forEach(p => store.add(p)) | ||
// store.build() | ||
// let node = store.find('foo') | ||
// console.log('name') | ||
function cleanPath(path) { | ||
return path.replace(/\/+/g, '/'); | ||
} | ||
exports.cleanPath = cleanPath; |
21
index.ts
@@ -257,19 +257,4 @@ // High-Octane route store/retriever | ||
// const paths = [ | ||
// 'Foo', | ||
// 'ab/c', | ||
// 'ab/cd/k', | ||
// 'abx', | ||
// 'abx/:id' | ||
// // 'a:foo(\\d+)Xk', | ||
// // 'a/([abc])?/(.)?', | ||
// // ':foo,:bar' | ||
// ] | ||
// const store = new Store() | ||
// paths.forEach(p => store.add(p)) | ||
// store.build() | ||
// let node = store.find('foo') | ||
// console.log('name') | ||
export function cleanPath(path: string): string { | ||
return path.replace(/\/+/g, '/') | ||
} |
{ | ||
"author": "Yosbel Marin", | ||
"name": "hoctane", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"license": "MIT", | ||
@@ -11,3 +11,3 @@ "description": "High-Octane route store/retriever", | ||
"build": "tsc", | ||
"test": "jasmine ./tests/store.js" | ||
"test": "jasmine ./tests/*.js" | ||
}, | ||
@@ -14,0 +14,0 @@ "keywords": [ |
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
21595
465