deduplicatearrayofstrings
v1.0.12
Published
This package uses es6. Removes duplicate strings from supplied array(s) and merges
Downloads
15
Maintainers
Readme
The package removes duplicate string values from the array supplied to it and returns the original array with blanks for the duplicates.
Method1: DeDuplicateArrayOfStrings
Parameter: Array
Method2: RemoveDuplicateValuesIn2ArraysAndMerge Parameters: array1,array2
Method3: RemoveDuplicateValuesIn3ArraysAndMerge Parameters: array1,array2,array3
v1.0.12 is es6 v1.0.11 is js
usage
// Method 1
const deDupe=require('deDuplicateArrayOfStrings')
var duplicatearray=[' ',' ','en','es','en','fr','es','en','en','fr','fr','Spectre','Pirates of the Caribbean','Spectre','Avatar','Avatar',
'Sam Worthington','Denzel Washington','en','Avatar','Sam Worthington','Sigourney Weaver','Denzel Washington','Sam Worthington',
'Sam Worthington']
var deduplicatedarray=deDupe.DeDuplicateArrayOfStrings(duplicatearray)
// Method 2
var arr1=['en','es','en','fr','es','en','en','fr','fr']
var arr2=['Spectre','Pirates of the Caribbean','Spectre','Avatar','Avatar']
var arr3=['Sam Worthington','Denzel Washington','Sam Worthington','Sigourney Weaver','Denzel Washington','Sam Worthington']
var arr4=deDupe.RemoveDuplicateValuesIn3ArraysAndMerge(arr1,arr2,arr3)
// Method 3
var arr1=['en','es','en','fr','es','en','en','fr','fr']
var arr2=['Spectre','Pirates of the Caribbean','Spectre','Avatar','Avatar']
var arr4=deDupe.RemoveDuplicateValuesIn2ArraysAndMerge(arr1,arr2)
##Install Install with npm
$ npm intall --save-dev deduplicatearrayofstrings
##Author: Ravichandran JV License: ISC