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:
Eric Cornelissen 2021-11-22 20:56:10 +01:00 committed by GitHub
parent a94f8dd1cf
commit 4c7b870af6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 19 deletions

4
index.d.ts vendored
View File

@ -15,10 +15,6 @@ export interface SimpleIcon {
} }
declare const icons: Record<string, SimpleIcon> & { declare const icons: Record<string, SimpleIcon> & {
/**
* @deprecated use .Get instead
*/
get(name: string): SimpleIcon;
Get(name: string): SimpleIcon; Get(name: string): SimpleIcon;
}; };

View File

@ -7,11 +7,4 @@ Object.defineProperty(icons, "Get", {
} }
}); });
Object.defineProperty(icons, "get", {
enumerable: false,
value: function(targetName) {
return this.Get(targetName);
}
});
module.exports = icons; module.exports = icons;

View File

@ -12,14 +12,6 @@ icons.forEach((icon) => {
expect(found.hex).toEqual(icon.hex); expect(found.hex).toEqual(icon.hex);
expect(found.source).toEqual(icon.source); 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`, () => { test(`Iterating over simpleIcons only exposes icons`, () => {