nicohaase/twig-isbn-formatter

ISBN formatting extension for Twig

0.3 2021-12-27 11:20 UTC

This package is auto-updated.

Last update: 2022-05-27 12:25:45 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