Skip to content

Commit ca5509d

Browse files
committed
Fix return annotation values and example code
1 parent 8af47d5 commit ca5509d

File tree

8 files changed

+20
-17
lines changed

8 files changed

+20
-17
lines changed

lib/node_modules/@stdlib/math/utils/incrspace/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ var arr = incrspace( 0, 11, 2 );
5151

5252
```javascript
5353
var arr = incrspace( 0.1, 0.5, 0.2 );
54-
// returns [ 0, ~0.3 ]
54+
// returns [ 0.1, ~0.3 ]
5555
```
5656

5757
where `arr[1]` is only guaranteed to be approximately equal to `0.3`.

lib/node_modules/@stdlib/utils/copy/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,20 @@ var bool = ( value[0] === out[0] );
8181
// Shallow copy:
8282
out = copy( value, 1 );
8383

84-
bool = ( value[0] === out[0] );
84+
bool = ( value === out );
8585
// returns false
8686

87-
bool = ( value[0].c === out[0].c );
87+
bool = ( value[0] === out[0] );
8888
// returns true
8989

9090
// Deep copy:
9191
out = copy( value, 2 );
9292

93-
bool = ( value[0].c === out[0].c );
93+
bool = ( value[0] === out[0] );
9494
// returns false
95+
96+
bool = ( value[0].c === out[0].c );
97+
// returns true
9598
```
9699

97100
</section>
@@ -172,7 +175,7 @@ bool = ( value[0].c === out[0].c );
172175
}
173176

174177
var foo1 = new Foo();
175-
var foo2 = copy( foo );
178+
var foo2 = copy( foo1 );
176179

177180
var bool = ( foo1._name === foo2._name );
178181
// returns true

lib/node_modules/@stdlib/utils/flatten-array/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,17 @@ To deep [copy][@stdlib/utils/copy] `array` elements, set the `copy` option to `t
110110
<!-- eslint-disable object-curly-newline -->
111111

112112
```javascript
113-
var flatten = flattenArray.factory( [ 3, 3 ] );
113+
var flatten = flattenArray.factory( [ 3, 3 ], {
114+
'copy': true
115+
});
114116

115117
var arr = [
116118
[ 1, 2, 3 ],
117119
[ 4, { 'x': 5 }, 6 ],
118120
[ 7, 8, 9 ]
119121
];
120122

121-
var out = flatten( arr, {
122-
'copy': true
123-
});
123+
var out = flatten( arr );
124124
// returns [ 1, 2, 3, 4, {'x':5}, 6, 7, 8, 9 ]
125125

126126
var bool = ( arr[1][1] === out[4] );

lib/node_modules/@stdlib/utils/flatten-object/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,15 @@ var obj = {
147147
}
148148
};
149149

150-
var out = flattenObject( obj );
150+
var out = flatten( obj );
151151
// returns { 'a|b|c': 'd' }
152152

153153
obj = {
154154
'a': {
155155
'b': [ 1, 2, 3 ]
156156
}
157157
};
158-
out = flattenObject( obj );
158+
out = flatten( obj );
159159
// returns { 'a|b|0': 1, 'a|b|1': 2, 'a|b|2': 3 }
160160
```
161161

lib/node_modules/@stdlib/utils/group-by/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ var opts = {
102102
'returns': '*'
103103
};
104104
var out = groupBy( arr, opts, indicator );
105-
// returns { 'b': [ [ 0, 'beep' ], [ 1, 'boop ], [ 3, 'bar' ] ], 'f': [ [ 2, 'foo' ] ] }
105+
// returns { 'b': [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ], 'f': [ [ 2, 'foo' ] ] }
106106
```
107107

108108
To set the `indicator` execution context, provide a `thisArg`.

lib/node_modules/@stdlib/utils/group/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ var opts = {
7979
'returns': '*'
8080
};
8181
var out = group( arr, opts, groups );
82-
// returns { 'b': [ [ 0, 'beep' ], [ 1, 'boop ], [ 3, 'bar' ] ], 'f': [ [ 2, 'foo' ] ] }
82+
// returns { 'b': [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ], 'f': [ [ 2, 'foo' ] ] }
8383
```
8484

8585
</section>

lib/node_modules/@stdlib/utils/inherited-properties/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ obj = new Foo();
114114
props = inheritedProperties( obj );
115115

116116
console.log( props );
117-
// => [ 'c', 'bip', ... ]
117+
// => [ ..., 'c', 'bip', ... ]
118118
```
119119

120120
</section>

lib/node_modules/@stdlib/utils/type-min/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ The following numeric types are supported:
8686
var typemin = require( '@stdlib/utils/type-min' );
8787

8888
var m = typemin( 'float64' );
89-
// returns -infinity
89+
// returns -Infinity
9090

9191
m = typemin( 'float32' );
92-
// returns -infinity
92+
// returns -Infinity
9393

9494
m = typemin( 'float16' );
95-
// returns -infinity
95+
// returns -Infinity
9696

9797
m = typemin( 'int32' );
9898
// returns -2147483648

0 commit comments

Comments
 (0)