enable generating name if `options.name` is a function