This package has been deprecated

Author message:

This package is no longer maintained

ft-next-article-genre

1.4.2 • Public • Published

next-article-genre Build Status

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'});

).

Readme

Keywords

none

Package Sidebar

Install

npm i ft-next-article-genre

Weekly Downloads

0

Version

1.4.2

License

none

Last publish

Collaborators

  • robgodfrey
  • robertboulton
  • seraph2000
  • hamza.samih
  • notlee
  • emmalewis
  • aendra
  • the-ft
  • rowanmanning
  • chee
  • alexwilson