Unique attribute names. close #119

This commit is contained in:
mattn
2013-04-19 13:22:06 +09:00
parent 6d07bd9752
commit 1f041e7dd3
4 changed files with 15 additions and 3 deletions

View File

@@ -247,3 +247,15 @@ function! zencoding#util#isImageMagickInstalled()
endif
return executable('identify')
endfunction
function! zencoding#util#unique(arr)
let m = {}
let r = []
for i in a:arr
if !has_key(m, i)
let m[i] = 1
call add(r, i)
endif
endfor
return r
endfunction