Skip to content

Commit 0b9ea2a

Browse files
committed
refactor: update accessor resolution to use dedicated package
1 parent 32e3f57 commit 0b9ea2a

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

  • lib/node_modules/@stdlib/console/log-each/lib

lib/node_modules/@stdlib/console/log-each/lib/main.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
2424
var isCollection = require( '@stdlib/assert/is-collection' );
25-
var accessors = require( '@stdlib/array/base/accessors' );
25+
var resolveGetter = require( '@stdlib/array/base/resolve-getter' );
2626
var format = require( '@stdlib/string/format' );
2727
var logger = require( '@stdlib/console/log' );
2828

@@ -48,7 +48,6 @@ function logEach( str ) {
4848
var len;
4949
var v;
5050
var s;
51-
var o;
5251
var i;
5352
var j;
5453
if ( !isString( str ) ) {
@@ -61,17 +60,15 @@ function logEach( str ) {
6160
for ( i = 1; i < nargs; i++ ) {
6261
v = arguments[ i ];
6362
if ( isCollection( v ) ) {
64-
o = accessors( v );
65-
getters.push( o.accessors[ 0 ] );
63+
getters.push( resolveGetter( v ) );
6664
args.push( v );
6765
strides.push( 1 );
6866
len = v.length;
6967
i += 1;
7068
break;
7169
} else {
7270
v = [ v ];
73-
o = accessors( v );
74-
getters.push( o.accessors[ 0 ] );
71+
getters.push( resolveGetter( v ) );
7572
args.push( v );
7673
strides.push( 0 );
7774
}
@@ -90,8 +87,7 @@ function logEach( str ) {
9087
v = [ v ];
9188
s = 0;
9289
}
93-
o = accessors( v );
94-
getters.push( o.accessors[ 0 ] );
90+
getters.push( resolveGetter( v ) );
9591
args.push( v );
9692
strides.push( s );
9793
}

0 commit comments

Comments
 (0)