Socket
Socket
Sign inDemoInstall

@ai-first/renderer-maxdome

Package Overview
Dependencies
11
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ai-first/renderer-maxdome

Generate localized texts with configurable parts for maxdome assets, maxperts and reviews


Version published
Maintainers
1
Install size
1.29 MB
Created

Readme

Source

Usage

Simplest usage, only the asset title

const renderer = require('ai-renderer-maxdome');

const string = renderer({ asset }, ['title']);
// "Criminal Minds: Beyond Borders"

Advanced usage, tip of the day with maxpert, typed title, genres and review

const renderer = require('ai-renderer-maxdome');

const string = renderer({ asset }, ['tipOfTheDay', 'typedTitle']);
// "Tipp des Tages: Die Serie Criminal Minds: Beyond Borders"

Advanced usage, tip of the day with maxpert, typed title, genres and review

const renderer = require('ai-renderer-maxdome');

const string = renderer({ asset, maxpert, review }, ['tipOfTheDay', 'maxpert', 'typedTitle', 'review']);
// "Tipp des Tages von Felix Böhme: Die Serie Criminal Minds: Beyond Borders, Weltweit den Tätern auf der Spur"

Documentation

renderer(data, parts)

data

Object with the available data for the output (asset, maxpert, review).

  • Component structure (asset and maxpert as part of review)
const data = { 
  review: { 
    ...,
    asset: { ... }, 
    maxpert: { ... }, 
  }, 
};
  • Separated structure
const data = { 
  asset: { ... }, 
  maxpert: { ... }, 
  review: { ... }, 
};

parts

Array with the enabled parts for the output. The order in the array doesn't influence the output.

  • description: Description of the asset, if combined with other parts, it will be added at the end
  • title: Title, e.g. "Criminal Minds: Beyond Borders"
  • typedTitle: Title prefixed with the type, e.g. "Die Serie Criminal Minds: Beyond Borders"
  • genres: Comma separated genres, e.g. ", Genres: Drama, Thriller"
  • tipOfTheDay: Prefix for the tip of the day, e.g. "Tipp des Tages: " or if maxpert is enabled "Tipp des Tages von ${maxpert}"
  • maxpert: Firstname and surname of the maxpert (only available with tipOfTheDay together), e.g. "Felix Böhme"
  • review: The headline of the review, e.g. ", Weltweit den Tätern auf der Spur"

FAQs

Last updated on 24 May 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc