Have ideas to improve npm?Join in the discussion! »

    @tractorzoom/equipment-attributes

    5.3.9 • Public • Published

    @tractorzoom/equipment-attributes

    Source of truth for equipment attributes by category

    Commitizen friendly jest Prettier Renovate enabled semantic-release

    Publish Status PR Verify Status

    Install

    npm i --save @tractorzoom/equipment-attributes
    

    Usage

    COMMON_ATTRIBUTES

    Array list of common attribute objects across all equipment types. See more

    CATEGORIES

    Object with values for each equipment category and corresponding subcategories. See more

    IDENTIFYING_ATTRIBUTES

    Array list of identifying attribute objects common across all equipment types. See more

    LOCATION_ATTRIBUTES

    Array list of location attribute objects common across all equipment types. See more

    VALUE_ATTRIBUTES

    Array list of value attribute objects common across all equipment types. See more

    getAttributesForCategory

    Function to get all equipment attributes for a given category. Returns an array list of attribute objects.

    import {CATEGORIES, getAttributesForCategory} from '@tractorzoom/equipment-attributes'
    
    const attributesForCategory = getAttributesForCategory(CATEGORIES.HARVESTING)
    

    Attribute

    property required description
    input no boolean that identifies attribute should be a input element
    inputType yes when input is true string that describes html type for input
    name yes name of attribute, camel casing
    options no array of options for select attributes, if empty, options should be populated from database
    select no boolean that identifies attribute should be a select element
    switch no boolean that identifies attribute should be a switch element
    unitOptions no array of unit string options for attribute

    Contributing

    Install node modules using node 10.x

    npm ci
    

    Testing

    npm run test
    

    More info on our standards related to JavaScript Testing can be found in our Day 1 repo

    Committing

    Info on our standards related to commits can be found in our Day 1 repo

    Install

    npm i @tractorzoom/equipment-attributes

    DownloadsWeekly Downloads

    424

    Version

    5.3.9

    License

    ISC

    Unpacked Size

    80.2 kB

    Total Files

    33

    Last publish

    Collaborators

    • avatar