Object.create with function