From ee4a63684e517085595b3ec3c9fd0ee3711bcb10 Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Sun, 17 Mar 2024 02:36:57 +0000 Subject: [PATCH] Update artifacts --- .../base/from-binary-string/coverage.ndjson | 1 + .../uint16/base/from-binary-string/index.html | 131 +++++++ .../base/from-binary-string/index.js.html | 244 +++++++++++++ .../base/from-binary-string/main.js.html | 322 ++++++++++++++++++ string/base/last/coverage.ndjson | 1 + string/base/last/index.html | 2 +- string/base/last/index.js.html | 2 +- string/base/last/main.js.html | 2 +- 8 files changed, 702 insertions(+), 3 deletions(-) create mode 100644 number/uint16/base/from-binary-string/coverage.ndjson create mode 100644 number/uint16/base/from-binary-string/index.html create mode 100644 number/uint16/base/from-binary-string/index.js.html create mode 100644 number/uint16/base/from-binary-string/main.js.html diff --git a/number/uint16/base/from-binary-string/coverage.ndjson b/number/uint16/base/from-binary-string/coverage.ndjson new file mode 100644 index 0000000000..fc07522cf7 --- /dev/null +++ b/number/uint16/base/from-binary-string/coverage.ndjson @@ -0,0 +1 @@ +[132,132,100,8,8,100,1,1,100,132,132,100,"0616f00c08b92c0c40ac1a1cabee46994e8d6d63","2024-03-16 22:35:17 -0400"] diff --git a/number/uint16/base/from-binary-string/index.html b/number/uint16/base/from-binary-string/index.html new file mode 100644 index 0000000000..40c4ca8689 --- /dev/null +++ b/number/uint16/base/from-binary-string/index.html @@ -0,0 +1,131 @@ + + + + + + Code coverage report for number/uint16/base/from-binary-string/lib + + + + + + + + + +
+
+

All files number/uint16/base/from-binary-string/lib

+
+ +
+ 100% + Statements + 132/132 +
+ + +
+ 100% + Branches + 8/8 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 132/132 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js +
+
100%53/53100%1/1100%0/0100%53/53
main.js +
+
100%79/79100%7/7100%1/1100%79/79
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/number/uint16/base/from-binary-string/index.js.html b/number/uint16/base/from-binary-string/index.js.html new file mode 100644 index 0000000000..afe2a28fa5 --- /dev/null +++ b/number/uint16/base/from-binary-string/index.js.html @@ -0,0 +1,244 @@ + + + + + + Code coverage report for number/uint16/base/from-binary-string/lib/index.js + + + + + + + + + +
+
+

All files / number/uint16/base/from-binary-string/lib index.js

+
+ +
+ 100% + Statements + 53/53 +
+ + +
+ 100% + Branches + 1/1 +
+ + +
+ 100% + Functions + 0/0 +
+ + +
+ 100% + Lines + 53/53 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +541x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x + 
/**
+* @license Apache-2.0
+*
+* Copyright (c) 2018 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+ 
+'use strict';
+ 
+/**
+* Create an unsigned 16-bit integer from a literal bit representation.
+*
+* @module @stdlib/number/uint16/base/from-binary-string
+*
+* @example
+* var fromBinaryStringUint16 = require( '@stdlib/number/uint16/base/from-binary-string' );
+*
+* var bstr = '0101010101010101';
+* var val = fromBinaryStringUint16( bstr );
+* // returns 21845
+*
+* bstr = '0000000000000000';
+* val = fromBinaryStringUint16( bstr );
+* // returns 0
+*
+* bstr = '0000000000000010';
+* val = fromBinaryStringUint16( bstr );
+* // returns 2
+*
+* bstr = '1111111111111111';
+* val = fromBinaryStringUint16( bstr );
+* // returns 65535
+*/
+ 
+// MODULES //
+ 
+var fromBinaryStringUint16 = require( './main.js' );
+ 
+ 
+// EXPORTS //
+ 
+module.exports = fromBinaryStringUint16;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/number/uint16/base/from-binary-string/main.js.html b/number/uint16/base/from-binary-string/main.js.html new file mode 100644 index 0000000000..7a096d366d --- /dev/null +++ b/number/uint16/base/from-binary-string/main.js.html @@ -0,0 +1,322 @@ + + + + + + Code coverage report for number/uint16/base/from-binary-string/lib/main.js + + + + + + + + + +
+
+

All files / number/uint16/base/from-binary-string/lib main.js

+
+ +
+ 100% + Statements + 79/79 +
+ + +
+ 100% + Branches + 7/7 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 79/79 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +801x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1010x +1010x +1010x +1010x +7x +7x +1003x +1010x +16048x +7990x +7990x +16048x +1003x +1010x +1x +1x +1x +1x +1x + 
/**
+* @license Apache-2.0
+*
+* Copyright (c) 2018 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+ 
+'use strict';
+ 
+// MODULES //
+ 
+var format = require( '@stdlib/string/format' );
+var pow = require( '@stdlib/math/base/special/pow' );
+ 
+ 
+// VARIABLES //
+ 
+var NBITS = 16;
+ 
+ 
+// MAIN //
+ 
+/**
+* Creates an unsigned 16-bit integer from a literal bit representation.
+*
+* @param {BinaryString} bstr - string which is a literal bit representation
+* @throws {Error} must provide a string with a length equal to `16`
+* @returns {uinteger16} unsigned 16-bit integer
+*
+* @example
+* var bstr = '0101010101010101';
+* var val = fromBinaryStringUint16( bstr );
+* // returns 21845
+*
+* @example
+* var bstr = '0000000000000000';
+* var val = fromBinaryStringUint16( bstr );
+* // returns 0
+*
+* @example
+* var bstr = '0000000000000010';
+* var val = fromBinaryStringUint16( bstr );
+* // returns 2
+*
+* @example
+* var bstr = '1111111111111111';
+* var val = fromBinaryStringUint16( bstr );
+* // returns 65535
+*/
+function fromBinaryStringUint16( bstr ) {
+	var sum;
+	var i;
+	if ( bstr.length !== NBITS ) {
+		throw new Error( format( 'invalid argument. Input string must have a length equal to %u. Value: `%s`.', NBITS, bstr ) );
+	}
+	sum = 0;
+	for ( i = 0; i < bstr.length; i++ ) {
+		if ( bstr[ i ] === '1' ) {
+			sum += pow( 2, (NBITS-i-1) );
+		}
+	}
+	return sum;
+}
+ 
+ 
+// EXPORTS //
+ 
+module.exports = fromBinaryStringUint16;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/string/base/last/coverage.ndjson b/string/base/last/coverage.ndjson index 0bc24628cf..b3a967c4f2 100644 --- a/string/base/last/coverage.ndjson +++ b/string/base/last/coverage.ndjson @@ -1 +1,2 @@ [97,97,100,3,3,100,1,1,100,97,97,100,"3b6b680826a663ca6d22b4d5666ef84389143330","2024-03-07 20:33:21 -0500"] +[97,97,100,3,3,100,1,1,100,97,97,100,"0616f00c08b92c0c40ac1a1cabee46994e8d6d63","2024-03-16 22:35:17 -0400"] diff --git a/string/base/last/index.html b/string/base/last/index.html index f25e358c43..9125b45aea 100644 --- a/string/base/last/index.html +++ b/string/base/last/index.html @@ -116,7 +116,7 @@

All files