{"id":26021211,"url":"https://github.com/teclone/industries","last_synced_at":"2025-03-06T08:50:31.005Z","repository":{"id":38175576,"uuid":"209854001","full_name":"teclone/industries","owner":"teclone","description":"Export list of industry categories, reusable for website implementations","archived":false,"fork":false,"pushed_at":"2023-10-18T23:17:18.000Z","size":2726,"stargazers_count":2,"open_issues_count":21,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T08:20:54.881Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teclone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-20T18:14:56.000Z","updated_at":"2023-03-18T08:56:01.000Z","dependencies_parsed_at":"2023-01-25T19:45:40.171Z","dependency_job_id":null,"html_url":"https://github.com/teclone/industries","commit_stats":null,"previous_names":["harrison-ifeanyichukwu/industries"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teclone%2Findustries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teclone%2Findustries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teclone%2Findustries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teclone%2Findustries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teclone","download_url":"https://codeload.github.com/teclone/industries/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242179280,"owners_count":20084940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-06T08:50:30.276Z","updated_at":"2025-03-06T08:50:30.989Z","avatar_url":"https://github.com/teclone.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Industries\n\nExports list of industry categories, reusable for website implementations, picked from linkedin.\n\n## Installation\n\nmodule is available via npm or yarn\n\n```bash\nnpm install @teclone/industries\n```\n\n## Usage\n\nimport english translation industries, which is the default. the rest of the locales industries can be imported directly from their file locations.\n\n- esm module import\n\n  ```javascript\n  import { industries } from '@teclone/industries';\n  industries.forEach((industry) =\u003e {\n    console.log(industry); // {id: number, linkedinId: number, name: string};\n  });\n  ```\n\n- cjs import\n\n  ```javascript\n  const { industries } = require('@teclone/industries');\n  industries.forEach((industry) =\u003e {\n    console.log(industry); // {id: number, linkedinId: number, name: string};\n  });\n  ```\n\n- esm module import, direct locale specific import\n\n  ```javascript\n  import industriesInSpanishLocale from '@teclone/industries/build/es/locales/es.json';\n  industriesInSpanishLocale.forEach((industry) =\u003e {\n    console.log(industry); // {id: number, linkedinId: number, name: string};\n  });\n  ```\n\n- cjs import, working in node.js (server side)\n\n  ```javascript\n  // require from @teclone/industries/esm/locales/es.json will also work because this is json file\n  const industriesInSpanishLocale = require('@teclone/industries/build/cjs/locales/es.json');\n\n  industriesInSpanishLocale.forEach((industry) =\u003e {\n    console.log(industry); // {id: number, linkedinId: number, name: string};\n  });\n  ```\n\n### Dynamic import of industries by locale with code-splitting support\n\n```javascript\nimport { getIndustriesByLocale } from '@teclone/industries';\n\nconst locale = 'fr';\n\ngetIndustriesByLocale(locale).then((industries) =\u003e {\n  industries.forEach((industry) =\u003e {\n    console.log(industry); // {id: number, linkedinId: number, name: string};\n  });\n});\n```\n\n### Print list of supported locales\n\n```javascript\nimport { supportedLocales } from '@teclone/industries';\n\nconsole.log(supportedLocales);\n```\n\n### Export types\n\n```javascript\nimport { type Industry, industries } from '@teclone/industries'\n\nconst industriesSamples: Industry[] = industries;\n\nindustriesSamples.forEach((industry) =\u003e {\n  console.log(industry); // {id: number, linkedinId: number, name: string};\n});\n```\n\n### Need to support more locales?\n\nPlease create a pull request to support other locales. Thanks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteclone%2Findustries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteclone%2Findustries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteclone%2Findustries/lists"}