* Creates a new revision string that does NOT include the revision height * For example '56649f1b0506c6ca9fda0746eb0cacdf'
(doc, deterministic_revs)
| 945 | * For example '56649f1b0506c6ca9fda0746eb0cacdf' |
| 946 | */ |
| 947 | function rev(doc, deterministic_revs) { |
| 948 | if (!deterministic_revs) { |
| 949 | return uuid.v4().replace(/-/g, '').toLowerCase(); |
| 950 | } |
| 951 | |
| 952 | var mutateableDoc = Object.assign({}, doc); |
| 953 | delete mutateableDoc._rev_tree; |
| 954 | return stringMd5(JSON.stringify(mutateableDoc)); |
| 955 | } |
| 956 | |
| 957 | var uuid$1 = uuid.v4; // mimic old import, only v4 is ever used elsewhere |
| 958 |
no test coverage detected