@stdlib/string-first 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2023 The Stdlib Authors.
1
+ Copyright (c) 2016-2024 The Stdlib Authors.
package/README.md CHANGED
@@ -72,7 +72,7 @@ The function supports the following options:
72
72
  - `'grapheme'`: grapheme clusters. Appropriate for strings containing visual characters which can span multiple Unicode code points (e.g., emoji).
73
73
  - `'code_point'`: Unicode code points. Appropriate for strings containing visual characters which are comprised of more than one Unicode code unit (e.g., ideographic symbols and punctuation and mathematical alphanumerics).
74
74
  - `'code_unit'`: UTF-16 code units. Appropriate for strings containing visual characters drawn from the basic multilingual plane (BMP) (e.g., common characters, such as those from the Latin, Greek, and Cyrillic alphabets).
75
-
75
+
76
76
  Default: `'grapheme'`.
77
77
 
78
78
  By default, the function returns the first character. To return the first `n` characters, provide a second argument specifying the number of characters to return.
@@ -101,7 +101,6 @@ out = first( 'foo bar', 10 );
101
101
 
102
102
  <!-- /.notes -->
103
103
 
104
-
105
104
  <section class="examples">
106
105
 
107
106
  ## Examples
@@ -146,7 +145,7 @@ str = first( '🐶🐮🐷🐰🐸', 10 );
146
145
  ## See Also
147
146
 
148
147
  - <span class="package-name">[`@stdlib/string-first-cli`][@stdlib/string-first-cli]</span><span class="delimiter">: </span><span class="description">CLI package for use as a command-line utility.</span>
149
-
148
+ - <span class="package-name">[`@stdlib/string-remove-first`][@stdlib/string/remove-first]</span><span class="delimiter">: </span><span class="description">remove the first character(s) of a string.</span>
150
149
 
151
150
  </section>
152
151
 
@@ -178,7 +177,7 @@ See [LICENSE][stdlib-license].
178
177
 
179
178
  ## Copyright
180
179
 
181
- Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
180
+ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
182
181
 
183
182
  </section>
184
183
 
@@ -193,8 +192,8 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
193
192
  [npm-image]: http://img.shields.io/npm/v/@stdlib/string-first.svg
194
193
  [npm-url]: https://npmjs.org/package/@stdlib/string-first
195
194
 
196
- [test-image]: https://github.com/stdlib-js/string-first/actions/workflows/test.yml/badge.svg?branch=v0.1.0
197
- [test-url]: https://github.com/stdlib-js/string-first/actions/workflows/test.yml?query=branch:v0.1.0
195
+ [test-image]: https://github.com/stdlib-js/string-first/actions/workflows/test.yml/badge.svg?branch=v0.2.1
196
+ [test-url]: https://github.com/stdlib-js/string-first/actions/workflows/test.yml?query=branch:v0.2.1
198
197
 
199
198
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/string-first/main.svg
200
199
  [coverage-url]: https://codecov.io/github/stdlib-js/string-first?branch=main
@@ -221,8 +220,11 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
221
220
  [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
222
221
 
223
222
  [deno-url]: https://github.com/stdlib-js/string-first/tree/deno
223
+ [deno-readme]: https://github.com/stdlib-js/string-first/blob/deno/README.md
224
224
  [umd-url]: https://github.com/stdlib-js/string-first/tree/umd
225
+ [umd-readme]: https://github.com/stdlib-js/string-first/blob/umd/README.md
225
226
  [esm-url]: https://github.com/stdlib-js/string-first/tree/esm
227
+ [esm-readme]: https://github.com/stdlib-js/string-first/blob/esm/README.md
226
228
  [branches-url]: https://github.com/stdlib-js/string-first/blob/main/branches.md
227
229
 
228
230
  [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/string-first/main/LICENSE
@@ -231,6 +233,12 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
231
233
 
232
234
  [mdn-regexp]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
233
235
 
236
+ <!-- <related-links> -->
237
+
238
+ [@stdlib/string/remove-first]: https://www.npmjs.com/package/@stdlib/string-remove-first
239
+
240
+ <!-- </related-links> -->
241
+
234
242
  </section>
235
243
 
236
244
  <!-- /.links -->
package/SECURITY.md ADDED
@@ -0,0 +1,5 @@
1
+ # Security
2
+
3
+ > Policy for reporting security vulnerabilities.
4
+
5
+ See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security).
@@ -18,7 +18,7 @@
18
18
 
19
19
  // TypeScript Version: 4.1
20
20
 
21
- // tslint:disable:unified-signatures
21
+ /* eslint-disable @typescript-eslint/unified-signatures */
22
22
 
23
23
  /**
24
24
  * Interface describing function options.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/string-first",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "Return the first character(s) of a string.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -15,19 +15,12 @@
15
15
  ],
16
16
  "main": "./lib",
17
17
  "directories": {
18
- "benchmark": "./benchmark",
19
18
  "doc": "./docs",
20
- "example": "./examples",
21
19
  "lib": "./lib",
22
- "test": "./test"
20
+ "dist": "./dist"
23
21
  },
24
22
  "types": "./docs/types",
25
- "scripts": {
26
- "test": "make test",
27
- "test-cov": "make test-cov",
28
- "examples": "make examples",
29
- "benchmark": "make benchmark"
30
- },
23
+ "scripts": {},
31
24
  "homepage": "https://stdlib.io",
32
25
  "repository": {
33
26
  "type": "git",
@@ -37,22 +30,18 @@
37
30
  "url": "https://github.com/stdlib-js/stdlib/issues"
38
31
  },
39
32
  "dependencies": {
40
- "@stdlib/array-base-assert-contains": "^0.1.0",
41
- "@stdlib/assert-has-own-property": "^0.1.0",
42
- "@stdlib/assert-is-nonnegative-integer": "^0.1.0",
43
- "@stdlib/assert-is-plain-object": "^0.1.0",
44
- "@stdlib/assert-is-string": "^0.1.0",
45
- "@stdlib/string-base-first": "^0.1.0",
46
- "@stdlib/string-base-first-code-point": "^0.1.0",
47
- "@stdlib/string-base-first-grapheme-cluster": "^0.1.0",
48
- "@stdlib/string-format": "^0.1.0"
49
- },
50
- "devDependencies": {
51
- "tape": "git+https://github.com/kgryte/tape.git#fix/globby",
52
- "proxyquire": "^2.0.0",
53
- "istanbul": "^0.4.1",
54
- "tap-min": "git+https://github.com/Planeshifter/tap-min.git"
33
+ "@stdlib/array-base-assert-contains": "^0.2.1",
34
+ "@stdlib/assert-has-own-property": "^0.2.1",
35
+ "@stdlib/assert-is-nonnegative-integer": "^0.2.1",
36
+ "@stdlib/assert-is-plain-object": "^0.2.1",
37
+ "@stdlib/assert-is-string": "^0.2.1",
38
+ "@stdlib/string-base-first": "^0.2.1",
39
+ "@stdlib/string-base-first-code-point": "^0.2.1",
40
+ "@stdlib/string-base-first-grapheme-cluster": "^0.2.1",
41
+ "@stdlib/string-format": "^0.2.1",
42
+ "@stdlib/error-tools-fmtprodmsg": "^0.2.1"
55
43
  },
44
+ "devDependencies": {},
56
45
  "engines": {
57
46
  "node": ">=0.10.0",
58
47
  "npm": ">2.7.0"
package/CITATION.cff DELETED
@@ -1,30 +0,0 @@
1
- cff-version: 1.2.0
2
- title: stdlib
3
- message: >-
4
- If you use this software, please cite it using the
5
- metadata from this file.
6
-
7
- type: software
8
-
9
- authors:
10
- - name: The Stdlib Authors
11
- url: https://github.com/stdlib-js/stdlib/graphs/contributors
12
-
13
- repository-code: https://github.com/stdlib-js/stdlib
14
- url: https://stdlib.io
15
-
16
- abstract: |
17
- Standard library for JavaScript and Node.js.
18
-
19
- keywords:
20
- - JavaScript
21
- - Node.js
22
- - TypeScript
23
- - standard library
24
- - scientific computing
25
- - numerical computing
26
- - statistical computing
27
-
28
- license: Apache-2.0 AND BSL-1.0
29
-
30
- date-released: 2016