@@ -29,7 +29,7 @@ export interface UserProfiles {
2929 svgFilters ?: boolean
3030}
3131
32- export interface DOMOptions {
32+ export interface DOMConfig {
3333 ADD_ATTR ?: string [ ]
3434 ADD_TAGS ?: string [ ]
3535 ALLOW_DATA_ATTR ?: boolean
@@ -51,32 +51,32 @@ export interface DOMOptions {
5151 WHOLE_DOCUMENT ?: boolean
5252}
5353
54- export interface Options {
55- dom ?: DOMOptions
54+ export interface Config {
55+ dom ?: DOMConfig
5656 eventHandlers ?: SelectorsToEventHandlers
5757}
5858
5959/**
6060 * Options that cannot be overidden by the user because they are used internaly by the library
6161 */
62- const mandatoryOptions : Options = {
62+ const mandatoryConfig : Config = {
6363 dom : {
6464 RETURN_DOM : false ,
6565 RETURN_DOM_FRAGMENT : true ,
6666 RETURN_DOM_IMPORT : false ,
6767 } ,
6868}
6969
70- const defaultOptions : Options = {
70+ const defaultConfig : Config = {
7171 dom : {
7272 ADD_ATTR : [ 'key' ] ,
7373 } ,
7474}
7575
76- export function getOptions ( options ?: Partial < Options > ) : Options {
77- if ( options ) {
78- return deepMerge ( defaultOptions , deepMerge ( options , mandatoryOptions ) )
76+ export function getConfig ( config ?: Partial < Config > ) : Config {
77+ if ( config ) {
78+ return deepMerge ( defaultConfig , deepMerge ( config , mandatoryConfig ) )
7979 } else {
80- return deepMerge ( defaultOptions , mandatoryOptions )
80+ return deepMerge ( defaultConfig , mandatoryConfig )
8181 }
8282}
0 commit comments