用对象替换基本类型

refactorgram

orders.filter(o => "high" === o.priority
                || "rush" === o.priority);

image/svg+xml

orders.filter(o => o.priority.higherThan(new Priority("normal")))

别名 用对象替换数据值,用类替换类型代码