diff --git a/README.md b/README.md index 9d1f95c4..2c6ca959 100644 --- a/README.md +++ b/README.md @@ -56,26 +56,6 @@ simpleIcons.get('[ICON SLUG]'); // For example: const icon = simpleIcons.get('simpleicons'); -console.log(icon); - -/* -{ - title: 'Simple Icons', - slug: 'simpleicons', - hex: '111111', - source: 'https://simpleicons.org/', - svg: '...', - path: 'M12 12v-1.5c-2.484 ...', - guidelines: 'https://simpleicons.org/styleguide', - license: { - type: '...', - url: 'https://example.com/' - } -} - -NOTE: the `guidelines` entry will be `undefined` if we do not yet have guidelines data for the icon. -NOTE: the `license` entry will be `undefined` if we do not yet have license data for the icon. -*/ ``` Alternatively you can import the needed icons individually, where `[ICON SLUG]` is replaced by a [slug]. @@ -87,6 +67,11 @@ require('simple-icons/icons/[ICON SLUG]'); // For example: const icon = require('simple-icons/icons/simpleicons'); +``` + +Either method will return an icon object: + +```javascript console.log(icon); @@ -105,8 +90,8 @@ console.log(icon); } } -NOTE: the `guidelines` entry will be `undefined` if we do not yet have guidelines data for the icon. -NOTE: the license may be `undefined` if there is no license data for the icon. +NOTE: the `guidelines` entry will be `undefined` if we do not yet have guidelines for the icon. +NOTE: the `license` entry will be `undefined` if we do not yet have license data for the icon. */ ```