source: imaps-frontend/node_modules/is-string/README.md@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 2.0 KB
Line 
1# is-string <sup>[![Version Badge][2]][1]</sup>
2
3[![github actions][actions-image]][actions-url]
4[![coverage][codecov-image]][codecov-url]
5[![dependency status][5]][6]
6[![dev dependency status][7]][8]
7[![License][license-image]][license-url]
8[![Downloads][downloads-image]][downloads-url]
9
10[![npm badge][11]][1]
11
12Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
13
14## Example
15
16```js
17var isString = require('is-string');
18var assert = require('assert');
19
20assert.notOk(isString(undefined));
21assert.notOk(isString(null));
22assert.notOk(isString(false));
23assert.notOk(isString(true));
24assert.notOk(isString(function () {}));
25assert.notOk(isString([]));
26assert.notOk(isString({}));
27assert.notOk(isString(/a/g));
28assert.notOk(isString(new RegExp('a', 'g')));
29assert.notOk(isString(new Date()));
30assert.notOk(isString(42));
31assert.notOk(isString(NaN));
32assert.notOk(isString(Infinity));
33assert.notOk(isString(new Number(42)));
34
35assert.ok(isString('foo'));
36assert.ok(isString(Object('foo')));
37```
38
39## Tests
40Simply clone the repo, `npm install`, and run `npm test`
41
42[1]: https://npmjs.org/package/is-string
43[2]: https://versionbadg.es/inspect-js/is-string.svg
44[5]: https://david-dm.org/inspect-js/is-string.svg
45[6]: https://david-dm.org/inspect-js/is-string
46[7]: https://david-dm.org/inspect-js/is-string/dev-status.svg
47[8]: https://david-dm.org/inspect-js/is-string#info=devDependencies
48[11]: https://nodei.co/npm/is-string.png?downloads=true&stars=true
49[license-image]: https://img.shields.io/npm/l/is-string.svg
50[license-url]: LICENSE
51[downloads-image]: https://img.shields.io/npm/dm/is-string.svg
52[downloads-url]: https://npm-stat.com/charts.html?package=is-string
53[codecov-image]: https://codecov.io/gh/inspect-js/is-string/branch/main/graphs/badge.svg
54[codecov-url]: https://app.codecov.io/gh/inspect-js/is-string/
55[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-string
56[actions-url]: https://github.com/inspect-js/is-string/actions
Note: See TracBrowser for help on using the repository browser.