File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 2525 integrity ="sha256-O7FfDCaEf9kSRN9b9kmWu8C3rhL1hxEpPHp+CTZ4pMk= " crossorigin ="anonymous " />
2626 < link rel ="stylesheet " href ="styles.css " />
2727
28- < script src ="https://cdn.polyfill.io/v2/polyfill.js?features=Array.from,Map&flags=gated "> </ script >
28+ < script src ="https://cdn.polyfill.io/v2/polyfill.js?features=Array.from,Map,Set &flags=gated "> </ script >
2929</ head >
3030
3131< body >
Original file line number Diff line number Diff line change 1- import { partition , uniq } from 'lodash' ;
1+ import { partition } from 'lodash' ;
22import { Char , ICharTrie } from '../types/charTrie' ;
33
44const leafNode = new Map ( ) as ICharTrie ;
@@ -56,6 +56,6 @@ function buildUnique(words: string[]): ICharTrie {
5656
5757/** @borrows buildUnique as build */
5858export function build ( words : string [ ] ) : ICharTrie {
59- const uniqueWords = uniq ( words ) ;
59+ const uniqueWords = [ ... new Set ( words ) ] ;
6060 return buildUnique ( uniqueWords ) ;
6161}
You can’t perform that action at this time.
0 commit comments