es-to-primitive

ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.

Browse on unpkg