Skip to content

Commit

Permalink
update lodash imports to direct module imports
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoSanchez committed Nov 21, 2024
1 parent d361a9b commit cb330fe
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/cuckoo/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

import {eq, indexOf} from 'lodash'
// eslint-disable-next-line node/no-missing-import
import eq from 'lodash/eq'
// eslint-disable-next-line node/no-missing-import
import indexOf from 'lodash/indexOf'
import * as utils from '../utils'
import {Exportable} from '../exportable'
import {cloneObject} from '../exportable'
Expand Down
3 changes: 2 additions & 1 deletion src/sketch/min-hash-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ SOFTWARE.
*/

import {HashFunction, MinHash} from './min-hash'
import {random} from 'lodash'
// eslint-disable-next-line node/no-missing-import
import random from 'lodash/random'

/**
* Test if a number is a prime number
Expand Down
3 changes: 2 additions & 1 deletion src/sketch/topk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ SOFTWARE.
import BaseFilter from '../base-filter'
import CountMinSketch from './count-min-sketch'
import {AutoExportable, Field, Parameter} from '../exportable'
import {sortedIndexBy} from 'lodash'
// eslint-disable-next-line node/no-missing-import
import sortedIndexBy from 'lodash/sortedIndexBy'

/**
* An element in a MinHeap
Expand Down
4 changes: 3 additions & 1 deletion test/min-hash-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ SOFTWARE.

require('chai').should()
const {MinHashFactory, MinHash} = require('../dist/api.js')
const {range, intersection, union} = require('lodash')
const range = require('lodash/range')
const intersection = require('lodash/intersection')
const union = require('lodash/union')

// Compute the exact Jaccard similairty between two sets
function jaccard(a, b) {
Expand Down
2 changes: 1 addition & 1 deletion test/utils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const {
} = require('../dist/utils')
const {BloomFilter, BaseFilter} = require('../dist/api.js')
const XXH = require('xxhashjs')
const {range} = require('lodash')
const range = require('lodash/range')
const seed = getDefaultSeed()
const {Hashing} = require('../dist/api')

Expand Down

0 comments on commit cb330fe

Please sign in to comment.