Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Occurences-example-request

node v8.17.0
version: 1.0.0
endpointsharetweet
const Occurences = require("occurences"); const request = require('request'); const url = "http://faker.hook.io/?property=lorem.sentences"; request({ url: url, json: true }, function (error, response, data) { if (!error && response.statusCode === 200) { let instance = new Occurences(data, {biggerThan: 4}); console.log('ALL STATS:') console.log(instance.stats); console.log('LONGEST WORD(S):'); console.log(instance.longest); } else { console.log("It seems an error occured when requesting ", url); } });
Loading…

no comments

    sign in to comment