@exom-dev/no-clid
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

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.0 - July 13th, 2020

License License: MIT

This project was created by The Exom Developers.

The NoClid project is licensed under the MIT license.

Package Sidebar

Install

npm i @exom-dev/no-clid

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

4.47 kB

Total Files

5

Last publish

Collaborators

  • pebly
  • unexomwid