Skip to content

Commit

Permalink
repackage
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanong committed Dec 12, 2014
1 parent 2407680 commit ccbc47c
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@

.DS_Store*
*.log
*.gz

node_modules
coverage
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_js:
- "0.10"
- "0.11"
language: node_js
script: "npm run-script test-travis"
after_script: "npm install coveralls@2 && cat ./coverage/lcov.info | coveralls"
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@

# ObjectID Sort IDs

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Dependency Status][david-image]][david-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![Gittip][gittip-image]][gittip-url]

Sort an array of objects or `ObjectID`s based on another array of `ObjectID`s.
Because MongoDB can't do this themselves without some crazy ass hacks.

Expand Down Expand Up @@ -34,3 +42,22 @@ arr === [
ObjectId(10),
]
```

[gitter-image]: https://badges.gitter.im/mongodb-utils/oid-sort-ids.png
[gitter-url]: https://gitter.im/mongodb-utils/oid-sort-ids
[npm-image]: https://img.shields.io/npm/v/oid-sort-ids.svg?style=flat-square
[npm-url]: https://npmjs.org/package/oid-sort-ids
[github-tag]: http://img.shields.io/github/tag/mongodb-utils/oid-sort-ids.svg?style=flat-square
[github-url]: https://github.com/mongodb-utils/oid-sort-ids/tags
[travis-image]: https://img.shields.io/travis/mongodb-utils/oid-sort-ids.svg?style=flat-square
[travis-url]: https://travis-ci.org/mongodb-utils/oid-sort-ids
[coveralls-image]: https://img.shields.io/coveralls/mongodb-utils/oid-sort-ids.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/mongodb-utils/oid-sort-ids
[david-image]: http://img.shields.io/david/mongodb-utils/oid-sort-ids.svg?style=flat-square
[david-url]: https://david-dm.org/mongodb-utils/oid-sort-ids
[license-image]: http://img.shields.io/npm/l/oid-sort-ids.svg?style=flat-square
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/oid-sort-ids.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/oid-sort-ids
[gittip-image]: https://img.shields.io/gratipay/jonathanong.svg?style=flat-square
[gittip-url]: https://gratipay.com/jonathanong/
24 changes: 14 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@
"name": "oid-sort-ids",
"description": "sort a list of ObjectIDs or objects based on an array of ObjectIDs",
"version": "1.0.0",
"author": {
"name": "Jonathan Ong",
"email": "[email protected]",
"url": "http://jongleberry.com",
"twitter": "https://twitter.com/jongleberry"
},
"author": "Jonathan Ong <[email protected]> (http://jongleberry.com)",
"license": "MIT",
"repository": "mongodb-utils/oid-sort-ids",
"devDependencies": {
"mongodb": "1",
"mocha": "1"
"istanbul": "0",
"mongodb": "2",
"mocha": "2"
},
"scripts": {
"test": "mocha --reporter spec --bail"
}
"test": "mocha --reporter spec",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
},
"keywords": [
"mongodb",
"oid",
"objectid",
"sort"
]
}
2 changes: 1 addition & 1 deletion test.js → test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var ObjectID = require('mongodb').ObjectID
var assert = require('assert')

var sort = require('./')
var sort = require('..')

it('should sort 2 objectids', function () {
var oids = [
Expand Down

0 comments on commit ccbc47c

Please sign in to comment.