require('array-future'); [1, 2, 3].average(); // 2 [1, 2, 3].first(); // 1 [1, 2, 3].shuffle(); // [ 2, 3, 1 ] [1, 2, 3].includes(3); // true
includes method is implemented as described by this documentation. Each method is tested with Mocha, and there's documentation in the readme.
Instead of capturing form data as essentially an array of key-value pairs which is the bread and butter of existing form encodings, it relies on a simple name attribute syntax that makes it possible to capture rich data structures as JSON directly.
This implementation lets you submit data to servers as JSON by setting a form's
application/json. It also supports REST API HTTP verbs like
FormData -- just use
new JSONFormData(form).formData to get an object based on the form.
If you're writing RESTful services with JSON and want to make a quick web interface, then JSONFormData should help speed things up.