summaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/README.md b/README.md
index 524f0c0..a078ce4 100644
--- a/README.md
+++ b/README.md
@@ -1254,3 +1254,16 @@ If a non-string argument is given, the function returns `null`.
b64enc("This is a test"); // "VGhpcyBpcyBhIHRlc3Q="
b64enc(123); // null
```
+
+#### 6.64. `uniq(array)`
+
+Returns a new array containing all unique values of the given input
+array. The order is preserved, that is subsequent duplicate values
+are simply skipped.
+
+If a non-array argument is given, the function returns `null`.
+
+```javascript
+uniq([ 1, true, "foo", 2, true, "bar", "foo" ]); // [ 1, true, "foo", 2, "bar" ]
+uniq("test"); // null
+```