Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Sep 21, 2023
1 parent 94931ba commit 6346329
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,8 @@ indent_size = 2
[*.gypi]
indent_style = space
indent_size = 2

# Set properties for citation files:
[*.{cff,cff.txt}]
indent_style = space
indent_size = 2
30 changes: 30 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
cff-version: 1.2.0
title: stdlib
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software

authors:
- name: The Stdlib Authors
url: https://github.com/stdlib-js/stdlib/graphs/contributors

repository-code: https://github.com/stdlib-js/stdlib
url: https://stdlib.io

abstract: |
Standard library for JavaScript and Node.js.
keywords:
- JavaScript
- Node.js
- TypeScript
- standard library
- scientific computing
- numerical computing
- statistical computing

license: Apache-2.0 AND BSL-1.0

date-released: 2016
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ limitations under the License.
-->


<details>
<summary>
About stdlib...
</summary>
<p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
<p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
<p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
<p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
</details>

# removeFirstCodePoint

[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function removeFirst( str, n ) {
break;
}
}
return str.substring( cnt, str.length );
return str.substring( i + 1, str.length );
}


Expand Down
9 changes: 9 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ tape( 'the function removes the first Unicode code point of a provided string (U
out = removeFirst( '六书/六書', 1 );
t.strictEqual( out, '书/六書', 'returns expected value' );

out = removeFirst( '𐒻𐓟', 1 );
t.strictEqual( out, '𐓟', 'returns expected value' );

out = removeFirst( '\uD800', 1 );
t.strictEqual( out, '', 'returns expected value' );

t.end();
});

Expand All @@ -92,5 +98,8 @@ tape( 'the function supports removing the first `n` Unicode code points of a pro
out = removeFirst( '六书/六書', 3 );
t.strictEqual( out, '六書', 'returns expected value' );

out = removeFirst( '𐓟𐒻𐓟', 2 );
t.strictEqual( out, '𐓟', 'returns expected value' );

t.end();
});

0 comments on commit 6346329

Please sign in to comment.