loader.io.api
Version:
loader.io api wrapper for nodejs. If you interested in this npm package, take a look at the npm package [perst](https://dasred.github.io/perst).
34 lines (31 loc) • 722 B
JavaScript
export default class Variable {
static SOURCE = {
HEADER: 'header'
};
/**
*
* @param {string} name
* @param {string} property
* @param {string} [source = Variable.SOURCE.HEADER]
*/
constructor({
name,
property,
source = Variable.SOURCE.HEADER
}) {
this.name = name;
this.property = property;
this.source = source;
}
/**
*
* @return {{name: string, property: string, source: string}}
*/
toJSON() {
return {
name: this.name,
property: this.property,
source: this.source,
};
}
}