@stdlib/string-capitalize
Advanced tools
+1
-0
@@ -8,1 +8,2 @@ | ||
| -V, --version Print the package version. | ||
| --split sep Delimiter for stdin data. Default: '/\\r?\\n/'. |
| { | ||
| "string": [ | ||
| "split" | ||
| ], | ||
| "boolean": [ | ||
@@ -3,0 +6,0 @@ "help", |
+1
-1
@@ -1,1 +0,1 @@ | ||
| Copyright (c) 2016-2021 The Stdlib Authors. | ||
| Copyright (c) 2016-2022 The Stdlib Authors. |
+4
-2
| { | ||
| "name": "@stdlib/string-capitalize", | ||
| "version": "0.0.7", | ||
| "version": "0.0.8", | ||
| "description": "Capitalize the first character in a string.", | ||
@@ -43,2 +43,3 @@ "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "@stdlib/assert-is-regexp-string": "^0.0.x", | ||
| "@stdlib/assert-is-string": "^0.0.x", | ||
@@ -49,3 +50,4 @@ "@stdlib/cli-ctor": "^0.0.x", | ||
| "@stdlib/regexp-eol": "^0.0.x", | ||
| "@stdlib/streams-node-stdin": "^0.0.x" | ||
| "@stdlib/streams-node-stdin": "^0.0.x", | ||
| "@stdlib/utils-regexp-from-string": "^0.0.x" | ||
| }, | ||
@@ -52,0 +54,0 @@ "devDependencies": { |
+73
-2
@@ -23,3 +23,3 @@ <!-- | ||
| [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] [![dependencies][dependencies-image]][dependencies-url] | ||
| [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] --> | ||
@@ -108,2 +108,4 @@ > Capitalize the first character in a string. | ||
| <!-- CLI usage documentation. --> | ||
| <section class="usage"> | ||
@@ -120,2 +122,3 @@ | ||
| -V, --version Print the package version. | ||
| --split sep Delimiter for stdin data. Default: '/\\r?\\n/'. | ||
| ``` | ||
@@ -127,2 +130,24 @@ | ||
| <!-- CLI usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> | ||
| <section class="notes"> | ||
| ### Notes | ||
| - If the split separator is a [regular expression][mdn-regexp], ensure that the `split` option is either properly escaped or enclosed in quotes. | ||
| ```bash | ||
| # Not escaped... | ||
| $ echo -n $'beep\nboop' | capitalize --split /\r?\n/ | ||
| # Escaped... | ||
| $ echo -n $'beep\nboop' | capitalize --split /\\r?\\n/ | ||
| ``` | ||
| - The implementation ignores trailing delimiters. | ||
| </section> | ||
| <!-- /.notes --> | ||
| <section class="examples"> | ||
@@ -144,2 +169,10 @@ | ||
| By default, when used as a [standard stream][standard-streams], the implementation assumes newline-delimited data. To specify an alternative delimiter, set the `split` option. | ||
| ```bash | ||
| $ echo -n 'beep\tbOOP' | capitalize --split '\t' | ||
| Beep | ||
| BOOP | ||
| ``` | ||
| </section> | ||
@@ -153,3 +186,20 @@ | ||
| <!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. --> | ||
| <section class="related"> | ||
| * * * | ||
| ## See Also | ||
| - <span class="package-name">[`@stdlib/string/uncapitalize`][@stdlib/string/uncapitalize]</span><span class="delimiter">: </span><span class="description">uncapitalize the first character of a string.</span> | ||
| - <span class="package-name">[`@stdlib/string/uppercase`][@stdlib/string/uppercase]</span><span class="delimiter">: </span><span class="description">convert a string to uppercase.</span> | ||
| </section> | ||
| <!-- /.related --> | ||
| <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> | ||
| <section class="main-repo" > | ||
@@ -178,3 +228,3 @@ | ||
| Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors]. | ||
| Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. | ||
@@ -198,5 +248,16 @@ </section> | ||
| <!-- | ||
| [dependencies-image]: https://img.shields.io/david/stdlib-js/string-capitalize.svg | ||
| [dependencies-url]: https://david-dm.org/stdlib-js/string-capitalize/main | ||
| --> | ||
| [umd]: https://github.com/umdjs/umd | ||
| [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules | ||
| [deno-url]: https://github.com/stdlib-js/string-capitalize/tree/deno | ||
| [umd-url]: https://github.com/stdlib-js/string-capitalize/tree/umd | ||
| [esm-url]: https://github.com/stdlib-js/string-capitalize/tree/esm | ||
| [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg | ||
@@ -213,4 +274,14 @@ [chat-url]: https://gitter.im/stdlib-js/stdlib/ | ||
| [mdn-regexp]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions | ||
| <!-- <related-links> --> | ||
| [@stdlib/string/uncapitalize]: https://www.npmjs.com/package/@stdlib/string-uncapitalize | ||
| [@stdlib/string/uppercase]: https://www.npmjs.com/package/@stdlib/string-uppercase | ||
| <!-- </related-links> --> | ||
| </section> | ||
| <!-- /.links --> |
Sorry, the diff of this file is not supported yet
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
41632
7.75%189
1.61%279
34.13%8
33.33%+ Added
+ Added
+ Added