0

Angular isNumeric

Posted by Chris Straw on April 3, 2018 in Angular, RxJS, Typescript |

For Angular, you can utilize the isNumeric from rxjs.

import { isNumeric } from "rxjs/util/isNumeric"

const value = isNumeric(data) ? Number(data) : 0;

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2011-2019 Chris Straw All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.