mirror of
https://github.com/simple-icons/simple-icons.git
synced 2024-11-16 00:59:07 +02:00
Remove .get
from package's default export (#6820)
* Remove `.get` from package's default export * Update TypeScript definitions * Updated index.js test suite
This commit is contained in:
parent
a94f8dd1cf
commit
4c7b870af6
4
index.d.ts
vendored
4
index.d.ts
vendored
@ -15,10 +15,6 @@ export interface SimpleIcon {
|
||||
}
|
||||
|
||||
declare const icons: Record<string, SimpleIcon> & {
|
||||
/**
|
||||
* @deprecated use .Get instead
|
||||
*/
|
||||
get(name: string): SimpleIcon;
|
||||
Get(name: string): SimpleIcon;
|
||||
};
|
||||
|
||||
|
@ -7,11 +7,4 @@ Object.defineProperty(icons, "Get", {
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(icons, "get", {
|
||||
enumerable: false,
|
||||
value: function(targetName) {
|
||||
return this.Get(targetName);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = icons;
|
||||
|
@ -12,14 +12,6 @@ icons.forEach((icon) => {
|
||||
expect(found.hex).toEqual(icon.hex);
|
||||
expect(found.source).toEqual(icon.source);
|
||||
});
|
||||
|
||||
test(`'get' ${icon.title} by its slug`, () => {
|
||||
const found = simpleIcons.get(slug);
|
||||
expect(found).toBeDefined();
|
||||
expect(found.title).toEqual(icon.title);
|
||||
expect(found.hex).toEqual(icon.hex);
|
||||
expect(found.source).toEqual(icon.source);
|
||||
});
|
||||
});
|
||||
|
||||
test(`Iterating over simpleIcons only exposes icons`, () => {
|
||||
|
Loading…
Reference in New Issue
Block a user