Functions Available To Your Custom 80app

The base EightyApp class that runs all 80apps has a wide variety of methods available that can make developing your own custom 80app much easier.

To see the source code for all of these methods, click here.

MethodDescription
app.say(text) Replaces console.log(text) for testing 80apps.
this.getPlainText(text) Given any string, it strips out all characters except alpha-numeric characters and common punctuation. It also replaces all space repetitions with a single space and other whitespace characters like tabs and newlines with a space.
this.removeExtraWhitespace(text) This is the same as getPlainText, except it does not remove any characters, just extra whitespace and whitespace characters (\t, \n, \r)
this.formatDate(date) Converts any date string into yyyy-MM-ddTHH:mm:ssZ format.
this.append80FlagToLink(eightyvalue, link) Appends an "80flag=" to the link you pass in.
this.get80Value(link) Extracts the value of the "80flag" parameter from a link.
this.makeLink(url, link) Generates a full URL based on the current domain you're crawling (url) and the link (link) you're attempting to crawl.
this.replaceSpecialCharacters(text) Replaces any special characters (e.g., Ä) with there non-special equivalent (e.g., "A").
this.getRelativeUnixTime(timeNumber, timeMeasurement) Converts a given relative timeframe from the current date (when crawled) to unix timestamp. E.g.: 9 weeks ago where 9 is the timeNumber and weeks is the timeMeasurement.