Table

<script src="./point_src/table"></script>

Generate a nested set of objects, given a set of rows and a set of headers.

let keys = [
    "minDistance"
    , "attractionStrength"
    , "repulsionStrength"
    , "damping"
    , "minVelocity"
    , "maxVelocity"
    , "itercount"
    , "method"
]

const confTable = new Table(keys, {
      'default': [30,  0.004, 200, 0.60,  0.1,  5]
    , 'alt':     [90,  0.002, 100, 0.66,  0.08, 5]
    , 'gas':     [100, 0.001, 800, 0.974, 0.1,  9,  1]
    , 'stable':  [100, 0.001, 80,  0.974, 0.01, 9,  1]
    , 'blob':    [90,  0.002, 100, 0.95,  0.1,  20, 1, 'springy']
})

const settings = confTable.get('blob')
{
    minDistance: 90
    , attractionStrength: 0.002
    , repulsionStrength: 100
    , damping: 0.95
    , minVelocity: 0.1
    , maxVelocity: 20
    , itercount: 1
    , method: 'springy'
}

The get method returns an object, with the keys given. If a property from the row does not exist, the keypair is not assigned to the result.

We can provide defaults for missing keys:

js confTable.get('default', { method: 'egg' })

Meta Data
title Table
dependencies ()
unused_keys ()
unknown_keys ()
filepath_exists True
path table
filepath table.js
clean_files ()

  • ClassDeclaration
    class comments:
    --- title: Table --- Generate a nested set of objects, given a set of _rows_ and a set of _headers_. let keys = [ "minDistance" , "attractionStrength" , "repulsionStrength" , "damping" , "minVelocity" , "maxVelocity" , "itercount" , "method" ] const confTable = new Table(keys, { 'default': [30, 0.004, 200, 0.60, 0.1, 5] , 'alt': [90, 0.002, 100, 0.66, 0.08, 5] , 'gas': [100, 0.001, 800, 0.974, 0.1, 9, 1] , 'stable': [100, 0.001, 80, 0.974, 0.01, 9, 1] , 'blob': [90, 0.002, 100, 0.95, 0.1, 20, 1, 'springy'] }) const settings = confTable.get('blob') { minDistance: 90 , attractionStrength: 0.002 , repulsionStrength: 100 , damping: 0.95 , minVelocity: 0.1 , maxVelocity: 20 , itercount: 1 , method: 'springy' } The `get` method returns an object, with the keys given. If a property from the row does not exist, the keypair is not assigned to the result. We can provide defaults for missing keys: ```js confTable.get('default', { method: 'egg' }) ```
    • constructor

      constructor

      (
      keys , rows , cached
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      get

      (
      key , defaults = undefined
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      getKeys

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      getRow

      (
      key
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      cache

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      create

      (
      rows , keys
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      rowsFromDict

      (
      rows , keys
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      rowsFromArray

      (
      rows , keys
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      dataRow

      (
      row , keys
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • ClassDeclaration
    class comments:
    , selected:'c'
    • method

      choice

      (
      opts , onchange
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      , selected:'c'
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])
  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])
  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])