File tree 3 files changed +10
-4
lines changed
3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
node_modules
2
2
coverage
3
3
.nyc_output
4
- yarn-error.log
4
+ yarn-error.log
5
+ npm-debug.log
Original file line number Diff line number Diff line change 1
1
language : node_js
2
2
node_js :
3
3
- " 8"
4
- - " 6"
5
4
env :
6
5
- MONGOOSE_VERSION=5
7
6
services : mongodb
Original file line number Diff line number Diff line change 1
1
# Mongoose Fields Filter
2
2
3
+ [ ![ Build Status] ( https://travis-ci.org/felipe-augusto/mongoose-fields-filter.png?branch=master )] ( https://travis-ci.org/felipe-augusto/mongoose-fields-filter )
4
+ [ ![ Coverage Status] ( https://coveralls.io/repos/github/felipe-augusto/mongoose-fields-filter/badge.svg?branch=master )] ( https://coveralls.io/github/felipe-augusto/mongoose-fields-filter?branch=master )
5
+ [ ![ npm version] ( https://badge.fury.io/js/mongoose-fields-filter.svg )] ( https://badge.fury.io/js/mongoose-fields-filter )
6
+ [ ![ GitHub license] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( https://raw.githubusercontent.com/felipe-augusto/mongoose-fields-filter/master/LICENSE )
7
+
8
+
3
9
## About
4
10
5
11
Mongoose plugin that provides private paths and custom permissions filtering
@@ -54,7 +60,7 @@ const UserSchema = new mongoose.Schema({
54
60
55
61
Scope query by passing which ` access ` you want the query to have, and then make the query:
56
62
57
- ```
63
+ ``` javascript
58
64
const AccessBoundModel = UserModel .byAccess ([' support' , ' financial' ])
59
65
const user = AccessBoundModel .findOne ({})
60
66
// filtering works here
@@ -106,4 +112,4 @@ SomeSchema.plugin(schema, config);
106
112
### LICENSE
107
113
108
114
The files in this archive are released under MIT license.
109
- You can find a copy of this license in [ LICENSE] ( ) .
115
+ You can find a copy of this license in [ LICENSE] ( https://github.com/felipe-augusto/mongoose-fields-filter/raw/master/LICENSE ) .
You can’t perform that action at this time.
0 commit comments