doc.silverstripe.org/src/utils/fileToTitle.js

6 lines
113 B
JavaScript
Raw Permalink Normal View History

2019-11-08 03:40:20 +01:00
const fileToTitle = (str) => (
str.replace(/^\d+_/, '').replace(/_/g, ' ')
);
module.exports = fileToTitle;