next-article-genre
Next currently categorizes content into four visually styling buckets - Default (News), Analysis, Comment and Lifestyle. This function takes a raw v1 article from CAPI, and returns either 'default', 'analysis', 'comment' or 'lifestyle' based on the genre of the article.
var getVisualCategorisation = require('ft-next-article-genre');
var theme = getVisualCategorisation(article.raw.item.metadata);
(August 2015 - as part of the design unification, genre differentiation has initially been turned off. This was achieved by defaulting the look up values for all genres to default. The original mapping is commented
To retrieve the genre that was previously returned pass in options as follows
var getEditorialTone = require('ft-next-article-genre');
var theme = getEditorialTone(article.raw.item.metadata, {requestedProp: 'editorialTone'});
).