mirror of
https://github.com/simple-icons/simple-icons.git
synced 2024-12-16 01:10:30 +02:00
Update Node Usage section in README (#4950)
Update the examples in the "Node Usage" section of the README to clarify where you need to specify the brand you're interested in. The approach follows the style of the "CDN Usage" section of the README.
This commit is contained in:
parent
22c577c177
commit
ce27500858
12
README.md
12
README.md
@ -50,7 +50,13 @@ The API can then be used as follows:
|
||||
```javascript
|
||||
const simpleIcons = require('simple-icons');
|
||||
|
||||
console.log(simpleIcons.get('Simple Icons'));
|
||||
// Get a specific icon by its name as:
|
||||
simpleIcons.get('[ICON NAME]');
|
||||
|
||||
// For example:
|
||||
const icon = simpleIcons.get('simpleicons');
|
||||
|
||||
console.log(icon);
|
||||
|
||||
/*
|
||||
{
|
||||
@ -68,6 +74,10 @@ Alternatively you can import the needed icons individually.
|
||||
This is useful if you are e.g. compiling your code with [webpack](https://webpack.js.org/) and therefore have to be mindful of your package size:
|
||||
|
||||
```javascript
|
||||
// Import a specific icon by its name as:
|
||||
require('simple-icons/icons/[ICON NAME]');
|
||||
|
||||
// For example:
|
||||
const icon = require('simple-icons/icons/simpleicons');
|
||||
|
||||
console.log(icon);
|
||||
|
Loading…
Reference in New Issue
Block a user