Skip to content

Commit

Permalink
rename module 'query-to-mongo'
Browse files Browse the repository at this point in the history
  • Loading branch information
pbatey committed Mar 24, 2015
1 parent cce1f32 commit 3d99e54
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ console.log(query)
##### links(url, totalCount)
Calculate relative links given the base url and totalCount. Can be used to populate the [express response links](http://expressjs.com/4x/api.html#res.links).
```javascript
var queryToMongo = require('query-to-mongodb')
var queryToMongo = require('query-to-mongo')
var query = queryToMongo('name=john&age>21&offset=20&limit=10')
console.log(query.links('http://localhost/api/v1/users', 100))
```
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "query-to-mongodb",
"name": "query-to-mongo",
"version": "0.1.0",
"description": "Convert query parameters into mongodb query criteria and options.",
"description": "Convert query parameters into mongo query criteria and options.",
"main": "index.js",
"repository": {
"type": "git",
"url": "http://github.com/pbatey/query-to-mongodb"
"url": "http://github.com/pbatey/query-to-mongo"
},
"author": "Phil Batey <pbatey@gmail.com>",
"license": "MIT License",
Expand Down
2 changes: 1 addition & 1 deletion test/links.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var assert = require("chai").assert
var q2m = require("../index")

describe("query-to-mongodb(query).links =>", function () {
describe("query-to-mongo(query).links =>", function () {
describe("#links", function () {
var links = q2m("offset=20&limit=10").links('http://localhost', 95)
it("should create first link", function () {
Expand Down
2 changes: 1 addition & 1 deletion test/qs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var assert = require("chai").assert
var q2m = require("../index")
var qs = require("qs")

describe("query-to-mongodb(query,{paser: qs}) =>", function () {
describe("query-to-mongo(query,{paser: qs}) =>", function () {
describe(".criteria", function () {
it("should create criteria", function () {
var results = q2m("foo[bar]=value", {parser: qs})
Expand Down
2 changes: 1 addition & 1 deletion test/query.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var assert = require("chai").assert
var q2m = require("../index")

describe("query-to-mongodb(query) =>", function () {
describe("query-to-mongo(query) =>", function () {
describe(".criteria", function () {
it("should create criteria", function () {
var results = q2m("field=value")
Expand Down

0 comments on commit 3d99e54

Please sign in to comment.