removeduplicatesfromarrayofarrays
v1.0.7
Published
This package uses es6 generator. Removes duplicate strings from supplied array of arrays
Maintainers
Readme
The package removes duplicate string values from the array of arrays supplied to it.
Constructor: removeduplicatesfromarrayofarrays
Parameter: Array of arrays
v1.0.5 - returns the arrays with duplicates removed v1.0.6 - returns a single array with duplicates removed Language: es6
Pre-requisites
- npm Install babel-core, babel-cli, babel-preset-es2015 as given in the package.json
- add .bablerc file to the root of this installation with preset value {"presets": "es2015"}
##Install Install with npm
$ npm install --save-dev removeduplicatesfromarrayofarrays@unmerged
$ npm install --save-dev removeduplicatesfromarrayofarrays@mergedDependency
deduplicatearrayofstrings - v1.0.12
$ npm install --save-dev deduplicatearrayofstringsusage
// removeduplicatesfromarrayofarrays@unmerged - will return three arrays with duplicates removed - [en,es,fr],[Avatar,Pirates of the Caribbean,Spectre],[Denzel Washington,Sam Worthington,Sigourney Weaver]
// removeduplicatesfromarrayofarrays@merged - will return a single array - [Avatar,Denzel Washington,Pirates of the Caribbean,Sam Worthington,Sigourney Weaver,Spectre,en,es,fr]
const gen=require('removeduplicatesfromarrayofarrays')
var duplicateArray1=['en','es','en','fr','es','en','en','fr','fr']
var duplicateArray2=['Spectre','Pirates of the Caribbean','Spectre','Avatar','Avatar']
var duplicateArray3=['Sam Worthington','Denzel Washington','Sam Worthington','Sigourney Weaver','Denzel Washington','Sam Worthington']
var duplicateArrayOfArrays=[]
duplicateArrayOfArrays.push(duplicateArray1)
duplicateArrayOfArrays.push(duplicateArray2)
duplicateArrayOfArrays.push(duplicateArray3)
var iterable=new gen(duplicateArrayOfArrays)
for (let x of iterable)
console.log("De-duplicated values - " + x)
##Author: Ravichandran JV License: ISC
