mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 14:16:06 +00:00
Add functions file for uniq
This commit is contained in:
1 parent
92bb618cf2
commit
9ccb82fa42
1 file changed
+34
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: uniq
|
||||||
|
linktitle: uniq
|
||||||
|
description: Takes in a slice or array and returns a slice with subsequent duplicate elements removed.
|
||||||
|
godocref:
|
||||||
|
date: 2017-02-01
|
||||||
|
publishdate: 2017-02-01
|
||||||
|
lastmod: 2017-02-01
|
||||||
|
categories: [functions]
|
||||||
|
menu:
|
||||||
|
docs:
|
||||||
|
parent: "functions"
|
||||||
|
tags: [multilingual,i18n,urls]
|
||||||
|
ns:
|
||||||
|
signature: ["uniq SET"]
|
||||||
|
workson: []
|
||||||
|
hugoversion:
|
||||||
|
relatedfuncs: []
|
||||||
|
deprecated: false
|
||||||
|
aliases: []
|
||||||
|
needsexamples: false
|
||||||
|
---
|
||||||
|
|
||||||
|
The `uniq` function takes in a slice or array and returns a slice with subsequent duplicate elements removed:
|
||||||
|
|
||||||
|
```html
|
||||||
|
{{ uniq (slice 1 2 3 2) }}
|
||||||
|
{{ slice 1 2 3 2 | uniq }}
|
||||||
|
<!-- both return [1 2 3] -->
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in new issue
Block a user