minimal adjustments
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / is-string / README.md
1 # is-string <sup>[![Version Badge][2]][1]</sup>
2
3 [![Build Status][3]][4]
4 [![dependency status][5]][6]
5 [![dev dependency status][7]][8]
6 [![License][license-image]][license-url]
7 [![Downloads][downloads-image]][downloads-url]
8
9 [![npm badge][11]][1]
10
11 [![browser support][9]][10]
12
13 Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
14
15 ## Example
16
17 ```js
18 var isString = require('is-string');
19 var assert = require('assert');
20
21 assert.notOk(isString(undefined));
22 assert.notOk(isString(null));
23 assert.notOk(isString(false));
24 assert.notOk(isString(true));
25 assert.notOk(isString(function () {}));
26 assert.notOk(isString([]));
27 assert.notOk(isString({}));
28 assert.notOk(isString(/a/g));
29 assert.notOk(isString(new RegExp('a', 'g')));
30 assert.notOk(isString(new Date()));
31 assert.notOk(isString(42));
32 assert.notOk(isString(NaN));
33 assert.notOk(isString(Infinity));
34 assert.notOk(isString(new Number(42)));
35
36 assert.ok(isString('foo'));
37 assert.ok(isString(Object('foo')));
38 ```
39
40 ## Tests
41 Simply clone the repo, `npm install`, and run `npm test`
42
43 [1]: https://npmjs.org/package/is-string
44 [2]: http://versionbadg.es/ljharb/is-string.svg
45 [3]: https://travis-ci.org/ljharb/is-string.svg
46 [4]: https://travis-ci.org/ljharb/is-string
47 [5]: https://david-dm.org/ljharb/is-string.svg
48 [6]: https://david-dm.org/ljharb/is-string
49 [7]: https://david-dm.org/ljharb/is-string/dev-status.svg
50 [8]: https://david-dm.org/ljharb/is-string#info=devDependencies
51 [9]: https://ci.testling.com/ljharb/is-string.png
52 [10]: https://ci.testling.com/ljharb/is-string
53 [11]: https://nodei.co/npm/is-string.png?downloads=true&stars=true
54 [license-image]: http://img.shields.io/npm/l/is-string.svg
55 [license-url]: LICENSE
56 [downloads-image]: http://img.shields.io/npm/dm/is-string.svg
57 [downloads-url]: http://npm-stat.com/charts.html?package=is-string