mirror of
https://github.com/simple-icons/simple-icons.git
synced 2024-12-26 01:13:41 +02:00
Document enumerability of the simple-icons object (#4814)
This commit is contained in:
parent
dce8c26312
commit
8cbaa6b22a
12
README.md
12
README.md
@ -84,6 +84,18 @@ console.log(icon);
|
||||
*/
|
||||
```
|
||||
|
||||
Lastly, the `simpleIcons` object is also enumerable.
|
||||
This is useful if you want to do a computation on every icon:
|
||||
|
||||
```javascript
|
||||
const simpleIcons = require('simple-icons');
|
||||
|
||||
for (const title in simpleIcons) {
|
||||
const icon = simpleIcons.get(title);
|
||||
// do stuff
|
||||
}
|
||||
```
|
||||
|
||||
#### TypeScript Usage
|
||||
|
||||
There are also TypeScript type definitions for the Node package. To use them, simply run:
|
||||
|
Loading…
Reference in New Issue
Block a user