simple-icons/scripts/utils.js
Aaron Benjamin 038c558fab Add Apple Pay, AT&T, T-Mobile, Sprint, Verizon, Boost, Framer (#973)
* 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
2018-09-11 08:42:29 +02:00

17 lines
504 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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, "")
)
}