Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
Co-authored-by: chirp <[email protected]>
  • Loading branch information
SarahIsWeird and chirpxiv authored Jan 9, 2025
1 parent 104681a commit 2befbb3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/scripting/scripts.lib/uniq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: .uniq()

A function that deduplicates adjacent elements from an array, while preserving the order of the remaining elements.

Similar to the *nix `uniq` command, duplicate values that are not adjacent are *not* removed.
Similar to the \*nix `uniq` command, duplicate values that are not adjacent are _not_ removed.

## Syntax

Expand All @@ -29,7 +29,6 @@ function(context, args) {
const l = #fs.scripts.lib();
const my_array = ["apples", "apples", "bananas", "oranges", "apples", "limes"];

const uniq_array = l.uniq(my_array); // => ["apples", "bananas", "oranges", "apples", "limes"]
return uniq_array;
return l.uniq(my_array); // => ["apples", "bananas", "oranges", "apples", "limes"]
}
```

0 comments on commit 2befbb3

Please sign in to comment.