This paper introduces traits.js, a small, portable trait composition library for
object composition and reuse. traits.js is motivated by two goals: ﬁrst, it is an
description format. By reusing this standard description format, traits.js can be
made more interoperable with similar libraries, and even with built-in primitives.
Second, traits.js makes it convenient to create “high-integrity” objects whose
integrity cannot be violated by clients, an important property in the context of
interaction between mutually suspicious scripts