/v-field-helper

interface and helpers for data inputs and json structures

Primary LanguageJavaScriptMIT LicenseMIT

Build StatusCoverage Status

v-field-helper

A Node.js module for interface and helpers for data inputs and json structures

Installation

npm install v-field-helper --save
yarn add v-field-helper
bower install v-field-helper --save

Usage

Javascript

var vfh = require('v-field-helper');
VFieldHelper = vfh.VFieldHelper;
var result = VFieldHelper.buildBaseString('purchaser');
Output should be:
  {
    placeholder: 'Type value_',
    custom_input_size: '4',
    input_name: 'purchaser',
    label: 'Purchaser',
    display_name: 'Purchaser',
    terse_display_name: 'Purchaser',
    hint: 'Purchaser',
    required: false,
    editable: true,
    as: 'string',
    fill_approach: 'manual',
    display: true,
    default_visible: true,
  }

TypeScript

import { VFieldHelper } from 'v-field-helper';
console.log(VFieldHelper.buildBaseString('purchaser'))
Output should be:
  {
    placeholder: 'Type value_',
    custom_input_size: '4',
    input_name: 'purchaser',
    label: 'Purchaser',
    display_name: 'Purchaser',
    terse_display_name: 'Purchaser',
    hint: 'Purchaser',
    required: false,
    editable: true,
    as: 'string',
    fill_approach: 'manual',
    display: true,
    default_visible: true,
  }

AMD

define(function(require,exports,module){
  var vfh = require('v-field-helper');
});

Test

npm run test