chore(utils/lightSet): minor improvement in clear method

This commit is contained in:
Julien Fontanet 2017-09-13 14:38:40 +02:00
parent 1037083ed2
commit 454412d9d4

View File

@ -293,7 +293,7 @@ export const parseXml = (function () {
// - works only with strings
// - methods are already bound and chainable
export const lightSet = collection => {
const data = createRawObject()
let data = createRawObject()
if (collection) {
forEach(collection, value => {
data[value] = true
@ -307,9 +307,7 @@ export const lightSet = collection => {
return set
},
clear: () => {
for (const value in data) {
delete data[value]
}
data = createRawObject()
return set
},
delete: value => {