Skip to content

Commit 9ca7cd8

Browse files
committed
Update README and license copyright year
1 parent 33f4ef5 commit 9ca7cd8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 Tom Spencer.
3+
Copyright (c) 2015-2020 Tom Spencer.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ npm install express-mongo-sanitize
1919
Add as a piece of express middleware, before defining your routes.
2020

2121
``` js
22-
var express = require('express'),
23-
bodyParser = require('body-parser'),
24-
mongoSanitize = require('express-mongo-sanitize');
22+
const express = require('express');
23+
const bodyParser = require('body-parser');
24+
const mongoSanitize = require('express-mongo-sanitize');
2525

26-
var app = express();
26+
const app = express();
2727

2828
app.use(bodyParser.urlencoded({extended: true}));
2929
app.use(bodyParser.json());
@@ -41,9 +41,9 @@ app.use(mongoSanitize({
4141
You can also bypass the middleware and use the module directly:
4242

4343
``` js
44-
var mongoSanitize = require('express-mongo-sanitize');
44+
const mongoSanitize = require('express-mongo-sanitize');
4545

46-
var payload = {...};
46+
const payload = {...};
4747

4848
// Remove any keys containing prohibited characters
4949
mongoSanitize.sanitize(payload);
@@ -54,7 +54,7 @@ mongoSanitize.sanitize(payload, {
5454
});
5555

5656
// Check if the payload has keys with prohibited characters
57-
var hasProhibited = mongoSanitize.has(payload);
57+
const hasProhibited = mongoSanitize.has(payload);
5858
```
5959

6060
## What?

0 commit comments

Comments
 (0)