1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2024-12-16 01:10:30 +02:00
simple-icons/scripts
Eric Cornelissen 8431fd9683
Simplify how scripts get icon slugs (#5066)
* Accept icon rather than title in `iconToSlug`

This removes the need in (most of the) calls to this function to
seperately check if there is a custom slug already defined for the icon.

* Rename `titleToSlug` to `getIconSlug`

* Revert unnecessary style change

* Update function documentation

* Keep `titleToSlug` and add `getIconSlug` helper

Unfortunately `this` is not available because we're using arrow syntax
for these functions, but refering to `titleToSlug` through
`module.exports` works fine as well.

* Fix parameter name in `getIconSlug` docs
2021-02-22 14:15:37 +01:00
..
templates Allow custom slugs (#4918) 2021-02-19 13:06:43 +00:00
build-package.js Simplify how scripts get icon slugs (#5066) 2021-02-22 14:15:37 +01:00
get-filename.js Simplify how scripts get icon slugs (#5066) 2021-02-22 14:15:37 +01:00
jsonlint.js Add icon license to JSON linting (and change JSON linting dependency) (#4945) 2021-02-19 15:19:22 +01:00
lint.js Refactor scripts in scripts/ (#4931) 2021-02-08 17:14:31 +01:00
utils.js Simplify how scripts get icon slugs (#5066) 2021-02-22 14:15:37 +01:00