Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
language: node_js
node_js:
- "6"
- "8"
- "10"
- "12"
- '6'
- '8'
- '10'
- '12'
- '14'
install:
- npm install -g codecov
script:
Expand Down
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
![Travis (.org)](https://img.shields.io/travis/596050/sic)
![Codecov](https://img.shields.io/codecov/c/github/596050/sic?token=555be04c-ccfa-41c4-8b86-d3f887213890)

Maps Standard Industial Classification (SIC) codes to English descriptions and vice versa.
Maps Standard Industrial Classification (SIC) codes to English descriptions and
vice versa. **As of version >=7.0.0 the 'getData' function includes division**

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

Expand All @@ -14,34 +15,34 @@ https://www.npmjs.com/package/@types/sic-list
## Example

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

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

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

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

How to change the description for a code

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

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

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

## Methods

Usage:

```js
const sicList = require("sic-list");
const sicList = require('sic-list');
```

All input is case-insensitive.
Expand All @@ -55,9 +56,9 @@ Replaces a description for a given code.
```js
[
{
code: "01210",
description: "Growing of white, black and red grapes"
}
code: '01210',
description: 'Growing of white, black and red grapes',
},
];
```

Expand Down
Loading