* Helper used by `to...` functions.
(options)
| 350 | * Helper used by `to...` functions. |
| 351 | */ |
| 352 | _getCustomString (options) { |
| 353 | if (options && typeof options === 'object') { |
| 354 | switch (typeof options.handler) { |
| 355 | case 'object': |
| 356 | case 'undefined': |
| 357 | return |
| 358 | case 'function': |
| 359 | return options.handler(this, options) |
| 360 | default: |
| 361 | throw new TypeError('Object or function expected as callback') |
| 362 | } |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | /** |
| 367 | * Get identifier. |