0.0.2 • Published 5 months ago

carcinogen-list-classification v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Carcinogenic Agents - List of Classifications

carcinogen-list-classification is a package that provides a javascript function that returns an array of objects containing information about all the carcicogenic agents (substances that can cause cancer) according to the IARC Monographs.

Carcinogens are clasified into 5 groups:

GroupWhat does it mean?
1Carcinogenic to humans
2AProbably carcinogenic to humans
2BPossibly carcinogenic to humans
3Carcinogenity not classifiable
4Probably not carcinogenic

The information provided by this list includes:

  • Agent
  • Group
  • Volume
  • Volume publication year
  • Evaluation year
  • Additional information

Example of the returned data:

[
  {
    agent: "Perfluorooctanoic acid (PFOA)",
    group: "1",
    volume: "110, 135",
    volumePublicationYear: "2025 online",
    evaluationYear: "2023",
    additionalInformation: ""
  },
  ...
]

How to install the package

The Carcinopgenic Agents - List of Classifications package can be installed with npm:

npm install carcinogen-list-classification

How to retrieve the information

The package can be imported in the code using require or import:

const { carcinogenListSearch } = require('carcinogen-list-classification')
import { carcinogenListSearch } from 'carcinogen-list-classification'

To get the information run the following, where <SEARCH_OPTIONS> is a Javascript object that contains the configuration for the search:

const list = carcinogenListSearch( <SEARCH_OPTIONS> )

Options

NameTypeDefaultDescription
groupsarray"1", "2A", "2B", "3", "4"Returns carcinogens belonging to the specified groups. The groups are: "1", "2A", "2B", "3", "4".
sortBystring"group"Sorts by the specified field. The possible fields are "agent", "group", "volume", "volumePublicationYear", "evaluationYear", "additionalInformation"
sortMethodstring"asc"How to sort the search, can be ascendant or descendant. Possible options are "asc" and "desc".
keywordsarray""Returns carcinogens that contains the specified keywords. If none are provided, it returns all.

Examples

// Returns all the list
carcinogenListSearch({})

// Only carcinogens belonging to groups 3 and 4
carcinogenListSearch({ groups: ["3", "4"] })

// Only carcinogens containing the keyword "virus" belonging to group 1
carcinogenListSearch({ keywords: ["virus"], groups: ["1"] })

// Sort the result by agent name in descending order and returns only carcinogens belonging to group 2A
carcinogenListSearch({ sortBy: "agent", sortMethod: "desc", groups: ["2A"] })
0.0.2

5 months ago

0.0.1

5 months ago