Skip to content

Commit e1a93e2

Browse files
committed
Modernize readme
1 parent 5cab12b commit e1a93e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ meteor add meteorhacks:picker
1515
~~~js
1616

1717
Picker.route('/post/:_id', function(params, req, res, next) {
18-
var post = Posts.findOne(params._id);
18+
const post = Posts.findOne(params._id);
1919
res.end(post.content);
2020
});
2121

@@ -34,11 +34,11 @@ This is a unique functionality of this router. See following example:
3434
Let's say we need to handle only `POST` requests. This is how you can do it with `Picker`.
3535

3636
~~~js
37-
var postRoutes = Picker.filter(function(req, res) {
37+
const postRoutes = Picker.filter(function(req, res) {
3838
// you can write any logic you want.
3939
// but this callback does not run inside a fiber
4040
// at the end, you must return either true or false
41-
return req.method == "POST";
41+
return req.method === "POST";
4242
});
4343

4444
postRoutes.route('/post/:id', function(params, req, res, next) {

0 commit comments

Comments
 (0)