source: trip-planner-front/node_modules/postcss/lib/declaration.js@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 495 bytes
Line 
1'use strict'
2
3let Node = require('./node')
4
5class Declaration extends Node {
6 constructor(defaults) {
7 if (
8 defaults &&
9 typeof defaults.value !== 'undefined' &&
10 typeof defaults.value !== 'string'
11 ) {
12 defaults = { ...defaults, value: String(defaults.value) }
13 }
14 super(defaults)
15 this.type = 'decl'
16 }
17
18 get variable() {
19 return this.prop.startsWith('--') || this.prop[0] === '$'
20 }
21}
22
23module.exports = Declaration
24Declaration.default = Declaration
Note: See TracBrowser for help on using the repository browser.