From c0cee9fca95bd6ebc3441d2f8fd3360670c7c507 Mon Sep 17 00:00:00 2001 From: 30secondsofcode <30secondsofcode@gmail.com> Date: Mon, 1 Oct 2018 16:38:09 +0000 Subject: [PATCH] Travis build: 570 --- README.md | 2 +- docs/type.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 74cf86b39..e8ec39467 100644 --- a/README.md +++ b/README.md @@ -8594,7 +8594,7 @@ isPromiseLike({}); // false ### isString -Checks if the given argument is a string. +Checks if the given argument is a string. Only works for string primitives. Use `typeof` to check if a value is classified as a string primitive. diff --git a/docs/type.html b/docs/type.html index 8d52b4bf3..12dcf006c 100644 --- a/docs/type.html +++ b/docs/type.html @@ -170,7 +170,7 @@ }); // true isPromiseLike(null); // false isPromiseLike({}); // false -
Checks if the given argument is a string.
Use typeof to check if a value is classified as a string primitive.
const isString = val => typeof val === 'string'; +
Checks if the given argument is a string. Only works for string primitives.
Use typeof to check if a value is classified as a string primitive.
const isString = val => typeof val === 'string';
isString('10'); // true
Checks if the given argument is a symbol.
Use typeof to check if a value is classified as a symbol primitive.
const isSymbol = val => typeof val === 'symbol';
isSymbol(Symbol('x')); // true