1.0.9 • Published 4 years ago

remove-deep-duplicate-from-array v1.0.9

Weekly downloads
108
License
ISC
Repository
github
Last release
4 years ago

removeDeepDuplicatesValues

You can pass array in argument if any two values are same wether different indexing it will appear single time

Example 1

const deepDuplicate = require("remove-deep-duplicate-from-array")

    let x = ['a' ,'b' , 'c' ,'a' , 'd' , 'b']

    let y = deepDuplicate(x)

    //output
    //y =  [ 'a', 'b', 'c', 'd' ]  

If we wants to remove the repeated values but values have complex structered objects and arrays it can remove repeated ones like ...

Example 2

const deepDuplicate = require("remove-deep-duplicate-from-array")

let x = ['a' ,'b' ,'c' ,'b' ,{d:'d' , e:'e' ,f:'f'} , {f:'f' , e:'e' ,d:'d'} , ['g' , 'h' ,'i'] , ['i' , 'h' ,'g']]

let y = deepDuplicate(x)

// output
// [ [ 'g', 'h', 'i' ], 'a', 'b', 'c', { d: 'd', e: 'e', f: 'f' } ] 
1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago