rotate-from-string
title: rotateFromString() in Iconify Utils
types:
IconCustomisations: './icon-customisations.md'
rotateFromString()
This function is part of Iconify Utils package.
Function [func]rotateFromString() cleans up various possible values for ration passed by user to valid [prop]rotate property of [type]IconCustomisations type.
Usage
Function has the following parameter:
[prop]value,[type]string. Value to parse.[prop]defaultValue,[type]number. Value to return if[prop]valuecannot be parsed.
Function returns [type]number value in [num]0 to [num]3 range.
Example
src: libraries/utils/rotate-from-string.ts
title: 'demo.ts'
extra:
- src: libraries/utils/rotate-from-string.txt
title: 'Result:'
这篇文档对你有帮助吗?
谢谢你的反馈!