This is a (very inefficient) JavaScript implementation of the Unicode Line Breaking Algorithm, version 15.0, together with the same algorithm as amended by document L2/22-080R2.

InputProposedUnicode 15.0