(pouchdb/pouchdb#1730) - experimental version that avoids eval