Skip to content

Commit

Permalink
Merge pull request nedbhq#3 from kba/nbsp-to-space-core
Browse files Browse the repository at this point in the history
Replace non-breaking-space with real space
  • Loading branch information
pi0 authored May 19, 2017
2 parents 13664cb + da17716 commit 10e3740
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ When a field in a document is an array, NeDB first tries to see if the query val

```javascript
// Exact match
db.find({ satellites: ['Phobos', 'Deimos'] }, function (err, docs) {
db.find({ satellites: ['Phobos', 'Deimos'] }, function (err, docs) {
// docs contains Mars
})
db.find({ satellites: ['Deimos', 'Phobos'] }, function (err, docs) {
db.find({ satellites: ['Deimos', 'Phobos'] }, function (err, docs) {
// docs is empty
})

Expand Down
2 changes: 1 addition & 1 deletion lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ lastStepModifierFunctions.$max = function (obj, field, value) {
* Updates the value of the field, only if specified field is smaller than the current value of the field
*/
lastStepModifierFunctions.$min = function (obj, field, value) {
if (typeof obj[field] === 'undefined') { 
if (typeof obj[field] === 'undefined') {
obj[field] = value;
} else if (value < obj[field]) {
obj[field] = value;
Expand Down
4 changes: 2 additions & 2 deletions test/model.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ describe('Model', function () {

it("Doesn't replace a falsy field by an object when recursively following dot notation", function () {
var obj = { nested: false }
, updateQuery = { $set: { "nested.now": 'it is' } }
, updateQuery = { $set: { "nested.now": 'it is' } }
, modified = model.modify(obj, updateQuery);

assert.deepEqual(modified, { nested: false }); // Object not modified as the nested field doesn't exist
Expand Down Expand Up @@ -430,7 +430,7 @@ describe('Model', function () {
assert.deepEqual(modified, { yup: 'yes', nested: {} });
});

it("When unsetting nested fields, should not create an empty parent to nested field", function () {
it("When unsetting nested fields, should not create an empty parent to nested field", function () {
var obj = model.modify({ argh: true }, { $unset: { 'bad.worse': true } });
assert.deepEqual(obj, { argh: true });

Expand Down

0 comments on commit 10e3740

Please sign in to comment.