Peripherals

Mole~ Peripherals

Creates a list of Peripherals which contain models and/or templates

{
	models: [
		{ name: 'model-name', data: '' }
	],
	templates: [
		{ name: 'template-name', string: '' }
	]
}

Constructor

new Peripherals()

Properties:
Name Type Description
models Array

A list of models

templates Array

A list of templates

Source:

Classes

Model
Template

Methods

(static) def(name, definition)

Look up the definition of a property

Source:
Parameters:
Name Type Description
name String

The nameThe name of the property you want to look up, or create

definition Object

An outline of the property, or properties you want to retrieve a definition for.

Example
{
	name: 'padding',
	abbr: 'p',
	children: [
		{ name: 'top', abbr: 't', parent: 'padding' },
		{ name: 'right', abbr: 'r', parent: 'padding' },
		{ name: 'bottom', abbr: 'b', parent: 'padding' },
		{ name: 'left', abbr: 'l', parent: 'padding' }
	]
}

(static) struct(data)

Create a data structure

Source:
Parameters:
Name Type Description
data String

The nameThe name of the property you want to look up, or create

Example
{
	value: 'headingColor',
	type: 'var',
	children: [{
		value: 'blue',
		type: 'value'
	}]
}