![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Things Canals does:
Things Canals doesn't do:
The limited scope of its responsibilities make it useful on the server and client! It also makes it really nice to write tests against, because it's all pure functions.
If type signatures appeal to you, Canals.compile works roughly like so:
Canals.compile :: {route: A, ...} -> (url) -> ({args: [arg1, arg2, ...],
query: {queryParam: queryVal, ...},
value: A})
Usage:
var route = Canals.compile({
"posts/:postId": function(postId) { ... }
"posts/:postId/comments/:commentId": function(postId, commendId) { ... },
"download/*path": function(path) { ... },
"edit(/:tab)": function(tab) { ... }
"about": "about",
"": "home"
});
// Note that Canals doesn't *execute* the callback. That's up to you to do,
// if you wish.
route("");
// {args: [], query: {}, value: "home"}
route("about");
// {args: [], query: {}, value: "about"}
route("about?lang=fr&v=2");
// {args: [], query: {"lang": "fr", "v": "2"}, value: "about"}
route("posts/1");
// {args: ["1"], query: {}, value: function(postId) { ... }}
route("posts/1/comments/3");
// {args: ["1", "3"], query: {}, value: function(postId, commentId) { ... }}
route("download/foo/bar/baz?lang=fr");
// {args: ["foo/bar/baz"], query: {"lang": "fr"},
// value: function(postId, commentId) { ... }}
route("edit");
// {args: [null], query: {}, value: function(tab) { ... }}
route("edit/preview");
// {args: ["preview"], query: {}, value: function(tab) { ... }}
route("upload"); // No route defined for "upload"
// null
The syntax for specifying routes was ripped directly from Backbone.Router.
FAQs
URL-source agnostic routing
The npm package canals receives a total of 0 weekly downloads. As such, canals popularity was classified as not popular.
We found that canals demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.