Socket
Book a DemoInstallSign in
Socket

@288-toolkit/base64-filters

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@288-toolkit/base64-filters

```sh npm i @288-toolkit/base64-filters ```

1.0.2
latest
npmnpm
Version published
Weekly downloads
19
-29.63%
Maintainers
2
Weekly downloads
 
Created
Source

Base64-filters

npm i @288-toolkit/base64-filters

This modules provides functions that will encode and decode positive numeric filters into base64 strings. This is suitable for use in URLs, since it will use the url safe variant of base64.

The main api are the functions encodeFilters and decodeFilters. It will use 2 formats, depending on the number of filters: If all filters have one or zero value, the layout will be x 16 bits numbers, one for each filter. 0 is used to represent no value. if any filter have more than one value, the layout will be 1 8 bits number for the length, followed by each value on 2 bytes (lowest/highest).

This means that the maximum value for a filter is 65535 and the maximum number of values per filter is 255. Only positive values are supported.

You can also choose the format strategy by using either encodeSingleFilters or encodeMultiFilters, along with their respective decode functions.

FAQs

Package last updated on 04 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.