Turf.js uses GeoJSON as inputs to its methods and so it is compatible with virtually all web mapping API’s. It allows you to perform spatial analysis right in the browser, with no need for server calls.
In this video I demonstrate how to install Turf.js into a web mapping application and how to use it to buffer a feature class from a leaflet web map. The second part on summarizing point attributes within a polygon will be coming soon.
This video is actually lecture #55 from a course on Leaflet programming that I am creating that will be available on Udemy June 15, 2017. I currently have a course on Web Programming for GIS Applications available on Udemy for $25. This course serves as a pre-requisite to the course on Leaflet programming if you are new to web GIS.