Skip to content

Commit

Permalink
Nicer README
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Feb 19, 2015
1 parent 2cd0122 commit 3454bc3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 18 deletions.
18 changes: 0 additions & 18 deletions README.markdown

This file was deleted.

28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Version sorter

Fast sorting of strings representing version numbers.

```rb
require 'version_sorter'

versions = ["1.0.9", "2.0", "1.0.10", "1.0.3", "2.0.pre"]

VersionSorter.sort(versions)
#=> 1.0.3
#=> 1.0.9
#=> 1.0.10
#=> 2.0.pre
#=> 2.0
```

Library API:

```rb
VersionSorter.sort(versions) #=> sorted array
VersionSorter.rsort(versions) #=> reverse sorted array

VersionSorter.sort!(versions) # sort array in place
VersionSorter.rsort!(versions) # reverse sort array in place
```

<http://github.com/blog/521-speedy-version-sorting>

0 comments on commit 3454bc3

Please sign in to comment.