The WKT parser can be used client-side in a browser and server-side via Node.js.

// parse a WKT string, converting it into a Terraformer.Primitive
vargeojson=Terraformer.WKT.parse('LINESTRING (30 10, 10 30, 40 40)');// take a primitive and convert it into a WKT representation
varpolygon=Terraformer.WKT.convert({"type":"Polygon","coordinates":[[[100.0,0.0],[101.0,0.0],[101.0,1.0],[100.0,1.0],[100.0,0.0]],[[100.2,0.2],[100.8,0.2],[100.8,0.8],[100.2,0.8],[100.2,0.2]]]});