Skip to content

Commit

Permalink
Update README and license copyright year
Browse files Browse the repository at this point in the history
  • Loading branch information
fiznool committed Mar 25, 2020
1 parent 33f4ef5 commit 9ca7cd8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Tom Spencer.
Copyright (c) 2015-2020 Tom Spencer.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ npm install express-mongo-sanitize
Add as a piece of express middleware, before defining your routes.

``` js
var express = require('express'),
bodyParser = require('body-parser'),
mongoSanitize = require('express-mongo-sanitize');
const express = require('express');
const bodyParser = require('body-parser');
const mongoSanitize = require('express-mongo-sanitize');

var app = express();
const app = express();

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

``` js
var mongoSanitize = require('express-mongo-sanitize');
const mongoSanitize = require('express-mongo-sanitize');

var payload = {...};
const payload = {...};

// Remove any keys containing prohibited characters
mongoSanitize.sanitize(payload);
Expand All @@ -54,7 +54,7 @@ mongoSanitize.sanitize(payload, {
});

// Check if the payload has keys with prohibited characters
var hasProhibited = mongoSanitize.has(payload);
const hasProhibited = mongoSanitize.has(payload);
```

## What?
Expand Down

0 comments on commit 9ca7cd8

Please sign in to comment.