simple-icons/tests/index.test.js
Sachin Raja fcec7adc8b
replace index.js entry point (#8058)
* replace index.js entry point

* add types.d.ts

* Update documentation

* Add Typescript usage example

* Drop template file

* Readd test

* Minor change

Co-authored-by: Álvaro Mondéjar Rubio <mondejar1994@gmail.com>
2022-11-28 12:32:57 +01:00

20 lines
441 B
JavaScript

import {
getIconsData,
getIconSlug,
slugToVariableName,
} from '../scripts/utils.js';
import * as simpleIcons from '../index.mjs';
import { testIcon } from './test-icon.js';
(async () => {
const icons = await getIconsData();
icons.map((icon) => {
const slug = getIconSlug(icon);
const variableName = slugToVariableName(slug);
const subject = simpleIcons[variableName];
testIcon(icon, subject, slug);
});
})();