From 802c1d8268dd330c56d3b1eec155228b1d368072 Mon Sep 17 00:00:00 2001 From: garyilayev <79512554+garyilayev@users.noreply.github.com> Date: Thu, 13 May 2021 14:37:46 +0300 Subject: [PATCH] Update Node Usage in README (#5675) --- README.md | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) 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. */ ```