mirror of
https://github.com/simple-icons/simple-icons.git
synced 2024-11-26 01:00:27 +02:00
038c558fab
* add new icons - add icon for AT&T - add icon for T-mobile - add icon for Sprint - add icon for Cricket - add icon for Verizon - add icon for Boost - add icon for Framer - add icon for Sketch - Update _data/simple-icons.json with new icon data * remove `<g>` from svg files - remove `<g>` from svg files to address svglint error * add apple pay - Add apple pay - Update simple-icons.json * make changes per review Changes were made based on review 9/9/18. * fixed AT&T naming
17 lines
504 B
JavaScript
17 lines
504 B
JavaScript
module.exports = {
|
|
/**
|
|
* Converts a brand title into a filename (not a full path)
|
|
* @param {String} title The title to convert
|
|
*/
|
|
titleToFilename: title => (
|
|
title.toLowerCase()
|
|
.replace(/\+/g, "plus")
|
|
.replace(/^\./, "dot-")
|
|
.replace(/\.$/, "-dot")
|
|
.replace(/\./g, "-dot-")
|
|
.replace(/^&/, "and-")
|
|
.replace(/&$/, "-and")
|
|
.replace(/&/g, "-and-")
|
|
.replace(/[ !’]/g, "")
|
|
)
|
|
} |