Function
| Static Public Summary | ||
| public |
Load a FZP file from the given URL. |
|
| public |
loadFZPandSVGs(src: String, url: String): FZP Load a FZP and all linked SVGs |
|
| public |
marshalToXML(fzp: FZP): String Create a xml string of a FZP instance. |
|
| public |
|
|
| public |
parse a fzp xml string |
|
| public |
parseProperties(xml: String): Object Get the parsed xml object and map to a proper structure |
|
Static Public
public loadFZP(src: String, url: String): Promise source
Load a FZP file from the given URL.
Example:
const {FZPUtils} = require('fzp-js')
FZPUtils.loadFZP('core/Arduino Nano3(fix).fzp')
.then((fzz) => {
console.log(fzz.fz)
})
.catch((err) => {
console.error(err)
})
public loadFZPandSVGs(src: String, url: String): FZP source
Load a FZP and all linked SVGs
Example:
const {FZPUtils} = require('fzp-js')
FZPUtils.loadFZPandSVGs('core/Arduino Nano3(fix).fzp')
.then((fzz) => {
console.log(fzz)
})
.catch((err) => {
console.error(err)
})
public marshalToXML(fzp: FZP): String source
Create a xml string of a FZP instance.
Params:
| Name | Type | Attribute | Description |
| fzp | FZP |
Example:
const {marshalToXML} = require('fzp-js')
const xmlData = FZPUtils.marshalToXML(fzp)
console.log(xmlData)
public parseConnectorView(xml: Object): FZPConnectorView source
Params:
| Name | Type | Attribute | Description |
| xml | Object |
