Function: sanitiseBrushPresets()
sanitiseBrushPresets(
input,author?):BrushPreset[]
Defined in: src/lib/classes/CustomPresets/index.ts:27
Keep only valid brush presets from an untrusted value (e.g. stored or imported), upgrading ones of version 1 (see
upgradeAsset).
Parameters
input
readonly unknown[]
author?
AssetAuthor = UNKNOWN_AUTHOR
the author of presets of version 1 with none
Returns
Example
sanitiseBrushPresets(await store.list(), app.author);