nicohaase/twig-isbn-formatter

ISBN formatting extension for Twig

0.2 2020-03-29 17:11 UTC

This package is auto-updated.

Last update: 2020-06-29 17:53:04 UTC


README

Based on nicebooks/isbn, this tiny package provides two Twig filters such that ISBNs can be formatted simply.

Installation

Just run composer install nicohaase/twig-isbn-formatter

Available filters

  • formatIsbn will add dashes where neccessary
  • toIsbn13 will provide a ISBN-13 out of any valid (ie. ISBN-10 or ISBN-13) input

Examples

  • {{"9783411040162"|formatIsbn}} will output 978-3-411-04016-2