Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

exom-dev/no-clid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

NoClid is an URL query filter for Node.js / Express.

It was made to reject the useless and bloated clid query parameters, such as fbclid and gclid.

Getting started

Installation

You can install NoClid just like any other npm package.

npm i @exom-dev/no-clid --save

Note: this package includes a declaration file for TypeScript.

Usage

NoClid is an express middleware. Here's a basic example:

const app = require('express')();
const noclid = require('@exom-dev/no-clid');

app.use(noclid());

app.get('/', (request, response) => {
  response.send('Hello!');
});

app.listen(80);

If the URL contains clid parameters, NoClid will automatically redirect the user to the filtered URL, while keeping other request parameters the same.

Default

By default, NoClid will filter fbclid and gclid query parameters.

Changing the default

NoClid accepts an array of query parameters that should be filtered.

app.use(noclid(['q', 'lang', 'any-query-you-want']));

Releases

0.1.1 - July 20th, 2020

0.1.0 - July 13th, 2020

License License: MIT

This project was created by The Exom Developers.

The NoClid project is licensed under the MIT license.