npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sic-list

v0.6.8

Published

Standard industrial classification list based on the excellent country-list package

Downloads

224

Readme

sic-list

Travis (.org) Codecov

Maps Standard Industial Classification (SIC) codes to English descriptions and vice versa.

https://www.npmjs.com/package/sic-list

Available in typescript

https://www.npmjs.com/package/@types/sic-list

Example

const { getCode, getDescription } = require("sic-list");

// codes must be strings
console.log(getDescription("43290")); // "Other construction installation"

console.log(getCode("Operation of rail freight terminals")); // "52211"

console.log(getCode("01101000 01100101 01101100 01101100 01101111")); // undefined

How to change the description for a code

const { overwrite, getDescription } = require("sic-list");

overwrite([
  { code: "01230", description: "Growing of citrus fruits and wild mushrooms" }
]);

console.log(getDescription("01230")); // "Growing of citrus fruits and wild mushrooms"

Methods

Usage:

const sicList = require("sic-list");

All input is case-insensitive.

overwrite(sics)

Expects an array of sic objects containing code and description properties.

Replaces a description for a given code.

[
  {
    code: "01210",
    description: "Growing of white, black and red grapes"
  }
];

getDescription(code)

Expects an sic code.

Returns the description for that sic code.

If not found, it returns undefined.

getCode(description)

Expects the English sic description.

Returns the code for that country.

If not found, it returns undefined.

getDescriptions()

Returns an array of all sic descriptions.

getCodes()

Returns an array of all sic codes.

getDescriptionList()

Returns a key-value object of all sics with the description as key.

getCodeList()

Returns a key-value object of all sics with the code as key.

getData()

Returns an array of all sic information, in the same format as it gets imported.

Install

npm install sic-list

or

yarn add sic-list

For typescript

npm install @types/sic-list

or

yarn add @types/sic-list

License

MIT

Source

Uses data from the Office of National Statistics (UK SIC 2007)

Which makes the list of SIC codes available free of charge.