Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace non-breaking-space with real space #3

Merged
merged 1 commit into from
May 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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