mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
22 lines
693 B
JavaScript
Executable File
22 lines
693 B
JavaScript
Executable File
import PinEntity from "../entity/PinEntity"
|
|
import Utility from "../Utility"
|
|
import GeneralSerializer from "./GeneralSerializer"
|
|
|
|
export default class PinSerializer extends GeneralSerializer {
|
|
|
|
constructor() {
|
|
super(v => `${PinEntity.lookbehind} (${v})`, PinEntity, "", ",", true)
|
|
}
|
|
|
|
/**
|
|
* @param {String[]} fullKey
|
|
* @param {Boolean} insideString
|
|
*/
|
|
writeValue(value, fullKey, insideString) {
|
|
if (value?.constructor === String && fullKey.length == 1 && fullKey[0] == "DefaultValue") {
|
|
return `"${Utility.encodeInputString(value)}"`
|
|
}
|
|
return super.writeValue(value, fullKey, insideString)
|
|
}
|
|
}
|