1.0.0-beta.3 • Published 9 years ago

ft-next-article-transforms v1.0.0-beta.3

Weekly downloads
6
License
-
Repository
-
Last release
9 years ago

next-article-transforms

Collection of useful functions/helpers to make articles returned from CAPI more useful for next.

##Helpers

1) getVisualCategorisation

Next currently categorizes content into three buckets - News, Analysis and comment. This function takes a raw v1 article from CAPI, and returns either 'news', 'analysis' or 'comment' based on the genre of the article.

var getVisualCategorisation = require('ft-next-article-transforms/src/v1/getVisualCategorisation');
var theme = getVisualCategorisation(article.raw.item); // if using ft-api-client pass in the raw capi item
1.0.0-beta.3

9 years ago

1.0.0-beta.2

9 years ago