Source

couchdb-compose / couchdb_compose / util.py

Full commit
1
2
3
4
5
6
7
8

def ellipsize(doc):
    if isinstance(doc, (str, unicode)):
        return '...' if '\n' in doc else doc
    elif isinstance(doc, list):
        return [ellipsize(item) for item in doc]
    elif doc is not None:
        return dict((key, ellipsize(value)) for key, value in doc.items())