Exports list of industry categories, reusable for website implementations, picked from linkedin.
module is available via npm or yarn
npm install @teclone/industries
import english translation industries, which is the default. the rest of the locales industries can be imported directly from their file locations.
-
esm module import
import { industries } from '@teclone/industries'; industries.forEach((industry) => { console.log(industry); // {id: number, linkedinId: number, name: string}; });
-
cjs import
const { industries } = require('@teclone/industries'); industries.forEach((industry) => { console.log(industry); // {id: number, linkedinId: number, name: string}; });
-
esm module import, direct locale specific import
import industriesInSpanishLocale from '@teclone/industries/build/es/locales/es.json'; industriesInSpanishLocale.forEach((industry) => { console.log(industry); // {id: number, linkedinId: number, name: string}; });
-
cjs import, working in node.js (server side)
// require from @teclone/industries/esm/locales/es.json will also work because this is json file const industriesInSpanishLocale = require('@teclone/industries/build/cjs/locales/es.json'); industriesInSpanishLocale.forEach((industry) => { console.log(industry); // {id: number, linkedinId: number, name: string}; });
import { getIndustriesByLocale } from '@teclone/industries';
const locale = 'fr';
getIndustriesByLocale(locale).then((industries) => {
industries.forEach((industry) => {
console.log(industry); // {id: number, linkedinId: number, name: string};
});
});
import { supportedLocales } from '@teclone/industries';
console.log(supportedLocales);
import { type Industry, industries } from '@teclone/industries'
const industriesSamples: Industry[] = industries;
industriesSamples.forEach((industry) => {
console.log(industry); // {id: number, linkedinId: number, name: string};
});
Please create a pull request to support other locales. Thanks