Merge pull request #18 from Bouncey/feat/transitionIntros
Feat Transition Intros
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
fa68757553
commit
4d9f59f318
@@ -13,22 +13,16 @@ const preFormattedBlockNames = {
|
||||
'the-dom': 'The DOM'
|
||||
};
|
||||
|
||||
const noFormatting = [
|
||||
'and',
|
||||
'for',
|
||||
'of',
|
||||
'the',
|
||||
'up',
|
||||
'with'
|
||||
];
|
||||
const noFormatting = ['and', 'for', 'of', 'the', 'up', 'with'];
|
||||
|
||||
exports.blockNameify = function blockNameify(phrase) {
|
||||
const preFormatted = preFormattedBlockNames[phrase] || '';
|
||||
if (preFormatted) {
|
||||
return preFormatted;
|
||||
}
|
||||
return phrase.split('-')
|
||||
.map((word) => {
|
||||
return phrase
|
||||
.split('-')
|
||||
.map(word => {
|
||||
if (noFormatting.indexOf(word) !== -1) {
|
||||
return word;
|
||||
}
|
||||
|
Reference in New Issue
Block a user