Skip to content

Commit

Permalink
feat: add returnCssProperty optional argument to isAnimatable to retu…
Browse files Browse the repository at this point in the history
…rn the CSS property instead of boolean if it's valid
  • Loading branch information
apasov committed Apr 7, 2020
1 parent 42e22e1 commit eb7407d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 9 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,22 @@ animatable.isAnimatable('cssOffset')
//=> true
```

`isAnimatable` has an optional argument:

```javascript
animatable.isAnimatable(stringToCheck, (returnCssProperty = false))
```

If `returnCssProperty` is `true` then `animatable.isAnimatable()` returns the CSS property instead of `true` if it's valid:

```javascript
animatable.isAnimatable('gridCoLumnGap', true)
//=> grid-column-gap

animatable.isAnimatable('textdecorationTHICKNess', true)
//=> text-decoration-thickness
```

# Development

Build the bundle for browsers into `./dist` folder:
Expand Down
2 changes: 1 addition & 1 deletion dist/animatable.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit eb7407d

Please sign in to comment.