def inner(items):
    for k,v in sorted(items):
        if k == 'is_':
            k = 'is'
        if isinstance(v,bool):
            yield '%s: %s'%(k,repr(v).lower())
        elif k == 'pattern':
            yield '%s: new RegExp(/%s/)'%(k,v)
        else:
            yield '%s: %r'%(k,v)
Sorted items to display as compatable js objects (eg bool,regex)
dataset/ETHPy150Open callowayproject/django-livevalidation/livevalidation/validator.py/inner