is-punctuation
Version:
Returns true if the given string is punctuation characters.
71 lines (44 loc) • 3.17 kB
Markdown
# is-punctuation [](https://www.npmjs.com/package/is-punctuation) [](https://npmjs.org/package/is-punctuation) [](https://npmjs.org/package/is-punctuation) [](https://travis-ci.org/jonschlinkert/is-punctuation)
> Returns true if the given string is punctuation characters.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save is-punctuation
```
See the [wikipedia punctuation](https://en.wikipedia.org/wiki/Punctuation) article for more details.
## Usage
```js
var isPunctuation = require('is-punctuation');
console.log(isPunctuation('!'));
//=> true
console.log(isPunctuation('foo'));
//=> false
```
## About
### Related projects
* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob "Returns true if a string has an extglob.")
* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
* [punctuation-regex](https://www.npmjs.com/package/punctuation-regex): Regular expression for matching punctuation characters. | [homepage](https://github.com/regexhq/punctuation-regex "Regular expression for matching punctuation characters.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
Please read the [contributing guide](.github/contributing.md) for avice on opening issues, pull requests, and coding standards.
### Building docs
_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
```sh
$ npm install -g verb verb-generate-readme && verb
```
### Running tests
Install dev dependencies:
```sh
$ npm install -d && npm test
```
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.3, on January 04, 2017._