UNPKG
couchdb-compile
Version:
latest (1.11.2)
1.11.2
1.11.1
1.11.0
1.10.0
1.9.0
1.8.0
1.7.0
1.6.3
1.6.2
1.6.1
1.6.0
1.5.5
1.5.4
1.5.3
1.5.2
1.5.1
1.5.0
1.4.0
Build CouchDB documents from fs.
github.com/jo/couchdb-compile
jo/couchdb-compile
couchdb-compile
/
test
/
fixtures
/
full
/
validate_doc_update.js
8 lines
(7 loc)
•
161 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
function
(
newDoc, oldDoc, userCtx, secObj
) {
if
(
typeof
newDoc.
number
!==
'number'
) {
throw
({
forbidden
:
'Document must have a number.'
}) } }