Gets the object property name as a string reference.
(&'a self)
| 386 | |
| 387 | /// Gets the object property name as a string reference. |
| 388 | pub fn as_str(&'a self) -> &'a str { |
| 389 | match self { |
| 390 | ObjectPropName::String(lit) => lit.value.as_ref(), |
| 391 | ObjectPropName::Word(lit) => lit.value, |
| 392 | } |
| 393 | } |
| 394 | } |
| 395 | |
| 396 | /// Represents an array that may contain elements (ex. `[]`, `[5, 6]`). |
no outgoing calls
no test coverage detected