CoolFace
Apppublic

AK-21/Graphite-Industrial-Intelligence

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
declaration.js25 linesDownload Raw Back to lib
1'use strict'2 3let Node = require('./node')4 5class Declaration extends Node {6  get variable() {7    return this.prop.startsWith('--') || this.prop[0] === '$'8  }9 10  constructor(defaults) {11    if (12      defaults &&13      typeof defaults.value !== 'undefined' &&14      typeof defaults.value !== 'string'15    ) {16      defaults = { ...defaults, value: String(defaults.value) }17    }18    super(defaults)19    this.type = 'decl'20  }21}22 23module.exports = Declaration24Declaration.default = Declaration25