How to use bloom-filters - 2 common examples

To help you get started, we’ve selected a few bloom-filters examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rgrove / rawgit / conf / index.js View on Github external
"use strict";

const { BloomFilter } = require('bloom-filters');
const path = require('path');

module.exports = {
  // Base URL to use when requesting gist files.
  baseGistUrl: 'https://gist.githubusercontent.com',

  // Base URL to use when requesting repo files.
  baseRepoUrl: 'https://raw.githubusercontent.com',

  // Bloom filter of grandfathered repos that may continue to use CDN URLs.
  cdnBloomFilter: BloomFilter.fromJSON(require('./bloom-filter-cdn.json')),

  // Domain to use for CDN requests to RawGit.
  cdnDomain: 'cdn.rawgit.com',

  // GitHub "username/repo" from which RawGit's own static assets should be
  // loaded via the CDN. Set this to a falsy value to disable loading static
  // assets from the CDN.
  // cdnRepo: 'rgrove/rawgit',

  // Git tag that points to the GitHub commit from which RawGit's own static
  // assets should be loaded via the CDN. Set this to a falsy value to disable
  // loading static assets from the CDN.
  // cdnTag: 'cdn-20180423',

  // Bloom filter of grandfathered repos that may continue to use dev URLs.
  devBloomFilter: BloomFilter.fromJSON(require('./bloom-filter-dev.json')),
github rgrove / rawgit / conf / index.js View on Github external
// Domain to use for CDN requests to RawGit.
  cdnDomain: 'cdn.rawgit.com',

  // GitHub "username/repo" from which RawGit's own static assets should be
  // loaded via the CDN. Set this to a falsy value to disable loading static
  // assets from the CDN.
  // cdnRepo: 'rgrove/rawgit',

  // Git tag that points to the GitHub commit from which RawGit's own static
  // assets should be loaded via the CDN. Set this to a falsy value to disable
  // loading static assets from the CDN.
  // cdnTag: 'cdn-20180423',

  // Bloom filter of grandfathered repos that may continue to use dev URLs.
  devBloomFilter: BloomFilter.fromJSON(require('./bloom-filter-dev.json')),

  // Domain to use for dev requests to RawGit.
  devDomain: 'rawgit.com',

  // Blacklist of file extensions that will always be redirected to GitHub, even
  // when requested via the CDN. Typically extensions are on this list because
  // GitHub serves them with the proper Content-Type and there's no reason to
  // proxy them.
  extensionBlacklist: new Set([
    '',
    '.bz2',
    '.dcm',
    '.exe',
    '.gif',
    '.gz',
    '.ico',

bloom-filters

JS implementation of probabilistic data structures: Bloom Filter (and its derived), HyperLogLog, Count-Min Sketch, Top-K and MinHash

MIT
Latest version published 1 month ago

Package Health Score

84 / 100
Full package analysis

Popular bloom-filters functions