2.2.0 • Published 5 years ago

@bb-cli/portal-model v2.2.0

Weekly downloads
3,215
License
SEE LICENSE IN LI...
Repository
-
Last release
5 years ago

@bb-cli/portal-model : object

Load And Manipulate Model Xml Data

Example

import { fromXml, name }from '@bb-cli/portal-model';
console.log(`name is ${name(fromXml(fs.readFileSync('model.xml')))}`);

@bb-cli/portal-model~type(model) ⇒ string

Extract catalog type from XML object.

Kind: inner method of @bb-cli/portal-model

ParamType
modelobject

@bb-cli/portal-model~fromXml(xml) ⇒ object

Convert XML string to JS representation (using jxon).

Kind: inner method of @bb-cli/portal-model

ParamTypeDescription
xmlstringModel xml

@bb-cli/portal-model~toXml(model) ⇒ string

Convert js object to XML

Kind: inner method of @bb-cli/portal-model
Returns: string - model XML

ParamTypeDescription
modelobjectXML object

@bb-cli/portal-model~name(model) ⇒ string

Extract name from XML object.

Kind: inner method of @bb-cli/portal-model

ParamType
modelobject

@bb-cli/portal-model~getPropertyValue(name, model) ⇒ string

Get the value of a property.

Kind: inner method of @bb-cli/portal-model

ParamType
namestring
modelobject

@bb-cli/portal-model~setProperty(propertyName, value, options, model) ⇒ object

Set the value & options of a property.

Kind: inner method of @bb-cli/portal-model
Returns: object - Updated model

ParamType
propertyNamestring
valuestring
optionsobject
modelobject

@bb-cli/portal-model~deleteProperty(propertyName, model) ⇒ object

Delete a property.

Kind: inner method of @bb-cli/portal-model
Returns: object - Updated model

ParamType
propertyNamestring
modelobject