refactor: substr -> substring (#11273)
This commit is contained in:
parent
af30959cb9
commit
c0dbc3b53f
23 changed files with 38 additions and 38 deletions
|
|
@ -98,7 +98,7 @@ function compile(theme: Theme): Record<string, string> {
|
|||
function getColor(val: string): tinycolor.Instance {
|
||||
// ref (prop)
|
||||
if (val[0] === '@') {
|
||||
return getColor(theme.props[val.substr(1)]);
|
||||
return getColor(theme.props[val.substring(1)]);
|
||||
}
|
||||
|
||||
// ref (const)
|
||||
|
|
@ -109,7 +109,7 @@ function compile(theme: Theme): Record<string, string> {
|
|||
// func
|
||||
else if (val[0] === ':') {
|
||||
const parts = val.split('<');
|
||||
const func = parts.shift().substr(1);
|
||||
const func = parts.shift().substring(1);
|
||||
const arg = parseFloat(parts.shift());
|
||||
const color = getColor(parts.join('<'));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue