credit-roles
CRediT (Contributor Roles Taxonomy) is a high-level taxonomy, including 14 roles, that can be used to represent the roles typically played by contributors to research outputs. The roles describe each contributor’s specific contribution to the scholarly output. (https://credit.niso.org/)
A utility for validating CRT Contributor Roles in your application, building canonical URLS, and showing descriptions.
npm install credit-roles
The library has no dependencies, and is helpful in validating, normalizing and showing descriptions of CRediT roles.
Overview & Usage
import credit, { CreditRole, CreditDescriptions } from 'credit-roles';
credit.validate('contributor');
credit.normalize('conceptualiSation');
credit.normalize('writing: original draft');
CreditDescriptions['Supervision'];
CreditRole.WritingOriginalDraft;
Included Utilities
validate
- Validates if a string to a CRediT role if it is valid, will take URLs and unformatted stringsnormalize
- Normalizes a CRediT string into the canonical string (including hyphens, capitalization and punctuation)buildUrl
- Builds a URL to https://credit.niso.org, includes normalizationCreditRole
- an enum of the CRediT rolesCreditDescriptions
- Official descriptions of the CRediT roles by NISO
Options
strict
: only accept normalized CRediT roles when validating or building URLs
References
Made with love by
Curvenote