UNPKG
phpjs
Version:
latest (1.3.2)
1.3.2
1.2.2
1.1.2
1.0.2
1.0.1
1.0.0
0.0.1
php.js offers community built php functions in javascript
phpjs.org
kvz/phpjs
phpjs
/
functions
/
var
/
is_string.js
10 lines
(9 loc)
•
321 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
function
is_string
(
mixed_var
) {
// From: http://phpjs.org/functions
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// * example 1: is_string('23');
// * returns 1: true
// * example 2: is_string(23.5);
// * returns 2: false
return
(
typeof
mixed_var ===
'string'
); }