Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

document the comparison case, 0.1.0

  • Loading branch information...
commit f1c2cbd31dd1566784fe015d224b6737f75f921c 1 parent d33258c
@substack authored
Showing with 7 additions and 1 deletion.
  1. +1 −1  package.json
  2. +6 −0 readme.markdown
View
2  package.json
@@ -1,6 +1,6 @@
{
"name" : "fort",
- "version" : "0.0.0",
+ "version" : "0.1.0",
"description" : "sort, min, and max by a transform function",
"main" : "index.js",
"bin" : {},
View
6 readme.markdown
@@ -82,6 +82,9 @@ Return the elements from `xs` sorted into ascending order after transforming by
The return array will be comprised of the original elements from `xs`, not the
transformed values from `f(x)`.
+If `xs` is a function or undefined, return a comparison function using
+`xs` or the identity as the function transform.
+
## fort.descend(xs, f)
Return the elements from `xs` sorted into descending order after transforming by
@@ -90,6 +93,9 @@ Return the elements from `xs` sorted into descending order after transforming by
The return array will be comprised of the original elements from `xs`, not the
transformed values from `f(x)`.
+If `xs` is a function or undefined, return a comparison function using
+`xs` or the identity as the function transform.
+
## fort.rise(xs, f)
Alias for `fort.ascend()` that is more consistent with the fort theme of this
Please sign in to comment.
Something went wrong with that request. Please try again.