Last Updated: May 28, 2017
·
713
· Codi

Check or validate if Javascript value is a string (is-string)

You can use this is-string Javascript component to check if a var (like str) is a string in javascript.

Examples:

isString(3) // => false isString('') // => true

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside