search-normalizer
v1.0.0
Published
It is the normalizer for input text, that can to create the hash by normalized search query
Downloads
5
Maintainers
Readme
Search Normalizer Extension
This is a JavaScript extension that normalizes the input query and generates a hash code for the normalized query.
Installation
To install the extension, you can use npm:
npm install search-normalizer
Usage
To use the extension, you can import the searchNormalizer
function and call it with a search query and an optional hash type:
const searchNormalizer = require('search-normalizer');
const query = 'Hello, how are you today?Ё';
const hashType = 'sha256'; // optional, defaults to 'sha256'
const normalizer = searchNormalizer(query, hashType);
console.log(normalizer.normalize()); // outputs the normalized query
console.log(normalizer.hash()); // outputs the hash code for the normalized query