* Creates a new revision string that does NOT include the revision height * For example '56649f1b0506c6ca9fda0746eb0cacdf'
(doc, deterministic_revs)
| 786 | * For example '56649f1b0506c6ca9fda0746eb0cacdf' |
| 787 | */ |
| 788 | function rev(doc, deterministic_revs) { |
| 789 | if (!deterministic_revs) { |
| 790 | return uuid.v4().replace(/-/g, '').toLowerCase(); |
| 791 | } |
| 792 | |
| 793 | var mutateableDoc = Object.assign({}, doc); |
| 794 | delete mutateableDoc._rev_tree; |
| 795 | return stringMd5(JSON.stringify(mutateableDoc)); |
| 796 | } |
| 797 | |
| 798 | var uuid$1 = uuid.v4; // mimic old import, only v4 is ever used elsewhere |
| 799 |
no test coverage detected