Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@stdlib/iter-to-array-view-right

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stdlib/iter-to-array-view-right - npm Package Compare versions

Comparing version
0.0.6
to
0.0.7
+2
-2
docs/types/index.d.ts

@@ -62,3 +62,3 @@ /*

*/
type Tertiary = ( value: any, index: number, src: ArrayLike<any> ) => any;
type Ternary = ( value: any, index: number, src: ArrayLike<any> ) => any;

@@ -73,3 +73,3 @@ /**

*/
type MapFunction = Nullary | Unary | Binary | Tertiary;
type MapFunction = Nullary | Unary | Binary | Ternary;

@@ -76,0 +76,0 @@ /**

@@ -27,3 +27,3 @@ /**

var isInteger = require( '@stdlib/assert-is-integer' ).isPrimitive;
var hasOwnProp = require( '@stdlib/assert-has-own-property' );
var arraylike2object = require( '@stdlib/array-base-arraylike2object' );

@@ -66,2 +66,3 @@

var fcn;
var set;
var i;

@@ -144,2 +145,3 @@ var v;

}
set = arraylike2object( out ).setter;
i = end;

@@ -150,8 +152,6 @@ if ( fcn ) {

v = iterator.next();
if ( hasOwnProp( v, 'value' ) ) {
out[ i ] = fcn.call( thisArg, v.value, i, end-i-1 );
}
if ( v.done ) {
break;
}
set( out, i, fcn.call( thisArg, v.value, i, end-i-1 ) );
}

@@ -163,8 +163,6 @@ return out;

v = iterator.next();
if ( hasOwnProp( v, 'value' ) ) {
out[ i ] = v.value;
}
if ( v.done ) {
break;
}
set( out, i, v.value );
}

@@ -171,0 +169,0 @@ return out;

+1
-1

@@ -1,1 +0,1 @@

Copyright (c) 2016-2021 The Stdlib Authors.
Copyright (c) 2016-2022 The Stdlib Authors.
{
"name": "@stdlib/iter-to-array-view-right",
"version": "0.0.6",
"version": "0.0.7",
"description": "Fill an array-like object view from right to left with values returned from an iterator.",

@@ -40,3 +40,3 @@ "license": "Apache-2.0",

"dependencies": {
"@stdlib/assert-has-own-property": "^0.0.x",
"@stdlib/array-base-arraylike2object": "^0.0.x",
"@stdlib/assert-is-collection": "^0.0.x",

@@ -49,7 +49,10 @@ "@stdlib/assert-is-function": "^0.0.x",

"devDependencies": {
"@stdlib/array-complex128": "^0.0.x",
"@stdlib/array-float64": "^0.0.x",
"@stdlib/array-to-iterator": "^0.0.x",
"@stdlib/bench": "^0.0.x",
"@stdlib/complex-float64": "^0.0.x",
"@stdlib/math-base-assert-is-nan": "^0.0.x",
"@stdlib/random-iter-randu": "^0.0.x",
"@stdlib/strided-base-reinterpret-complex128": "^0.0.x",
"@stdlib/utils-noop": "^0.0.x",

@@ -56,0 +59,0 @@ "tape": "git+https://github.com/kgryte/tape.git#fix/globby",

@@ -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] -->

@@ -136,5 +136,5 @@ > Fill an array-like object view from right to left with values returned from an iterator.

- `value`: iterated value
- `index`: destination index (zero-based)
- `n`: iteration index (zero-based)
- **value**: iterated value.
- **index**: destination index (zero-based).
- **n**: iteration index (zero-based).

@@ -188,2 +188,3 @@ ```javascript

- Iteration stops when an output array view is full **or** an iterator finishes; whichever comes first.
- The function supports output array-like objects having getter and setter accessors for array element access (e.g., [`@stdlib/array/complex64`][@stdlib/array/complex64]).

@@ -235,2 +236,18 @@ </section>

<!-- 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/array/from-iterator`][@stdlib/array/from-iterator]</span><span class="delimiter">: </span><span class="description">create (or fill) an array from an iterator.</span>
- <span class="package-name">[`@stdlib/array/to-view-iterator-right`][@stdlib/array/to-view-iterator-right]</span><span class="delimiter">: </span><span class="description">create an iterator from an array-like object view, iterating from right to left.</span>
- <span class="package-name">[`@stdlib/iter/to-array-view`][@stdlib/iter/to-array-view]</span><span class="delimiter">: </span><span class="description">fill an array-like object view with values returned from an iterator.</span>
</section>
<!-- /.related -->
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

@@ -262,3 +279,3 @@

Copyright &copy; 2016-2021. The Stdlib [Authors][stdlib-authors].
Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].

@@ -282,5 +299,16 @@ </section>

<!--
[dependencies-image]: https://img.shields.io/david/stdlib-js/iter-to-array-view-right.svg
[dependencies-url]: https://david-dm.org/stdlib-js/iter-to-array-view-right/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/iter-to-array-view-right/tree/deno
[umd-url]: https://github.com/stdlib-js/iter-to-array-view-right/tree/umd
[esm-url]: https://github.com/stdlib-js/iter-to-array-view-right/tree/esm
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg

@@ -295,4 +323,16 @@ [chat-url]: https://gitter.im/stdlib-js/stdlib/

[@stdlib/array/complex64]: https://www.npmjs.com/package/@stdlib/array-complex64
<!-- <related-links> -->
[@stdlib/array/from-iterator]: https://www.npmjs.com/package/@stdlib/array-from-iterator
[@stdlib/array/to-view-iterator-right]: https://www.npmjs.com/package/@stdlib/array-to-view-iterator-right
[@stdlib/iter/to-array-view]: https://www.npmjs.com/package/@stdlib/iter-to-array-view
<!-- </related-links> -->
</section>
<!-- /.links -->