Skip to content

Commit 18a0528

Browse files
committed
Auto-generated commit
1 parent 70bfff4 commit 18a0528

File tree

5 files changed

+26
-188
lines changed

5 files changed

+26
-188
lines changed

.github/.keepalive

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-11-01T01:00:38.709Z

.github/workflows/publish.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ jobs:
182182
fi
183183
# Trim leading and trailing whitespace:
184184
dep=$(echo "$dep" | xargs)
185-
version="^$(npm view $dep version)"
185+
version="$(npm view $dep version)"
186+
if [[ -z "$version" ]]; then
187+
continue
188+
fi
189+
version="^$version"
186190
jq -r --arg dep "$dep" --arg version "$version" '.dependencies[$dep] = $version' package.json > package.json.tmp
187191
mv package.json.tmp package.json
188192
done
@@ -192,7 +196,11 @@ jobs:
192196
fi
193197
# Trim leading and trailing whitespace:
194198
dep=$(echo "$dep" | xargs)
195-
version="^$(npm view $dep version)"
199+
version="$(npm view $dep version)"
200+
if [[ -z "$version" ]]; then
201+
continue
202+
fi
203+
version="^$version"
196204
jq -r --arg dep "$dep" --arg version "$version" '.devDependencies[$dep] = $version' package.json > package.json.tmp
197205
mv package.json.tmp package.json
198206
done

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ Stephannie Jiménez Gacha <steff456@hotmail.com>
3737
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
3838
orimiles5 <97595296+orimiles5@users.noreply.github.com>
3939
rei2hu <reimu@reimu.ws>
40+
Robert Gislason <gztown2216@yahoo.com>

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@
4242
},
4343
"devDependencies": {
4444
"@stdlib/array-buffer": "^0.1.0",
45-
"@stdlib/array-float32": "^0.1.0",
46-
"@stdlib/array-float64": "^0.1.0",
47-
"@stdlib/array-int16": "^0.1.0",
48-
"@stdlib/array-int32": "^0.1.0",
49-
"@stdlib/array-int8": "^0.1.0",
50-
"@stdlib/array-uint16": "^0.1.0",
51-
"@stdlib/array-uint32": "^0.1.0",
52-
"@stdlib/array-uint8": "^0.1.0",
53-
"@stdlib/array-uint8c": "^0.1.0",
54-
"@stdlib/assert-has-map-support": "^0.1.0",
45+
"@stdlib/array-float32": "^0.1.1",
46+
"@stdlib/array-float64": "^0.1.1",
47+
"@stdlib/array-int16": "^0.1.1",
48+
"@stdlib/array-int32": "^0.1.1",
49+
"@stdlib/array-int8": "^0.1.1",
50+
"@stdlib/array-uint16": "^0.1.1",
51+
"@stdlib/array-uint32": "^0.1.1",
52+
"@stdlib/array-uint8": "^0.1.1",
53+
"@stdlib/array-uint8c": "^0.1.1",
54+
"@stdlib/assert-has-map-support": "^0.1.1",
5555
"@stdlib/assert-has-set-support": "^0.1.1",
5656
"@stdlib/assert-has-symbol-support": "^0.1.1",
5757
"@stdlib/assert-has-weakmap-support": "^0.1.1",

test/dist/test.js

Lines changed: 4 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2018 The Stdlib Authors.
4+
* Copyright (c) 2023 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -21,185 +21,13 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24-
var hasSymbols = require( '@stdlib/assert-has-symbol-support' );
25-
var hasMap = require( '@stdlib/assert-has-map-support' );
26-
var hasSet = require( '@stdlib/assert-has-set-support' );
27-
var hasWeakMap = require( '@stdlib/assert-has-weakmap-support' );
28-
var hasWeakSet = require( '@stdlib/assert-has-weakset-support' );
29-
var Int8Array = require( '@stdlib/array-int8' );
30-
var Uint8Array = require( '@stdlib/array-uint8' );
31-
var Uint8ClampedArray = require( '@stdlib/array-uint8c' );
32-
var Int16Array = require( '@stdlib/array-int16' );
33-
var Uint16Array = require( '@stdlib/array-uint16' );
34-
var Int32Array = require( '@stdlib/array-int32' );
35-
var Uint32Array = require( '@stdlib/array-uint32' );
36-
var Float32Array = require( '@stdlib/array-float32' );
37-
var Float64Array = require( '@stdlib/array-float64' );
38-
var ArrayBuffer = require( '@stdlib/array-buffer' );
39-
var Symbol = require( '@stdlib/symbol-ctor' );
40-
var Number = require( '@stdlib/number-ctor' );
41-
var Boolean = require( '@stdlib/boolean-ctor' );
42-
var isObjectLike = require( './../../dist' );
43-
44-
45-
// VARIABLES //
46-
47-
var opts;
24+
var main = require( './../../dist' );
4825

4926

5027
// TESTS //
5128

52-
tape( 'main export is a function', function test( t ) {
29+
tape( 'main export is defined', function test( t ) {
5330
t.ok( true, __filename );
54-
t.strictEqual( typeof isObjectLike, 'function', 'export is a function' );
55-
t.end();
56-
});
57-
58-
tape( 'attached to the main export is a function to test if a value is an array of object-like elements', function test( t ) {
59-
t.equal( typeof isObjectLike.isObjectLikeArray, 'function', 'has method' );
60-
t.end();
61-
});
62-
63-
tape( 'the function returns a boolean indicating if a value is object-like', function test( t ) {
64-
var expected;
65-
var values;
66-
var bool;
67-
var i;
68-
69-
values = [
70-
'a',
71-
new String( 'a' ), // eslint-disable-line no-new-wrappers
72-
5,
73-
new Number( 5 ), // eslint-disable-line no-new-wrappers
74-
NaN,
75-
true,
76-
new Boolean( true ), // eslint-disable-line no-new-wrappers
77-
false,
78-
new Boolean( false ), // eslint-disable-line no-new-wrappers
79-
void 0,
80-
null,
81-
[],
82-
{},
83-
function noop() {},
84-
/./,
85-
new Date(),
86-
Math,
87-
JSON,
88-
new Error(),
89-
new TypeError(),
90-
new SyntaxError(),
91-
new URIError(),
92-
new EvalError(),
93-
new ReferenceError(),
94-
new RangeError(),
95-
new Int8Array(),
96-
new Uint8Array(),
97-
new Uint8ClampedArray(),
98-
new Int16Array(),
99-
new Uint16Array(),
100-
new Int32Array(),
101-
new Uint32Array(),
102-
new Float32Array(),
103-
new Float64Array(),
104-
new ArrayBuffer()
105-
];
106-
107-
expected = [
108-
false, // 'a'
109-
true, // String
110-
false, // 5
111-
true, // Number
112-
false, // NaN
113-
false, // true
114-
true, // Boolean
115-
false, // false
116-
true, // Boolean
117-
false, // void 0
118-
false, // null
119-
true, // []
120-
true, // {}
121-
false, // function
122-
true, // RegExp
123-
true, // Date
124-
true,
125-
true,
126-
true,
127-
true,
128-
true,
129-
true,
130-
true,
131-
true,
132-
true,
133-
true,
134-
true,
135-
true,
136-
true,
137-
true,
138-
true,
139-
true,
140-
true,
141-
true,
142-
true
143-
];
144-
145-
for ( i = 0; i < values.length; i++ ) {
146-
bool = isObjectLike( values[i] );
147-
t.equal( bool, expected[i], 'returns '+expected[i]+' when provided '+values[i] );
148-
}
31+
t.strictEqual( main !== void 0, true, 'main export is defined' );
14932
t.end();
15033
});
151-
152-
opts = {
153-
'skip': !hasMap()
154-
};
155-
tape( 'the function supports Map objects', opts, function test( t ) {
156-
var bool = isObjectLike( new Map() );
157-
t.equal( bool, true, 'returns true' );
158-
t.end();
159-
});
160-
161-
opts = {
162-
'skip': !hasWeakMap()
163-
};
164-
tape( 'the function supports WeakMap objects', opts, function test( t ) {
165-
var bool = isObjectLike( new WeakMap() );
166-
t.equal( bool, true, 'returns true' );
167-
t.end();
168-
});
169-
170-
opts = {
171-
'skip': !hasSet()
172-
};
173-
tape( 'the function supports Set objects', opts, function test( t ) {
174-
var bool = isObjectLike( new Set() );
175-
t.equal( bool, true, 'returns true' );
176-
t.end();
177-
});
178-
179-
opts = {
180-
'skip': !hasWeakSet()
181-
};
182-
tape( 'the function supports WeakSet objects', opts, function test( t ) {
183-
var bool = isObjectLike( new WeakSet() );
184-
t.equal( bool, true, 'returns true' );
185-
t.end();
186-
});
187-
188-
opts = {
189-
'skip': !hasSymbols()
190-
};
191-
tape( 'the function supports Symbol objects', opts, function test( t ) {
192-
var bool = isObjectLike( Symbol( 'beep' ) );
193-
t.equal( bool, false, 'returns false' );
194-
t.end();
195-
});
196-
197-
tape( 'the function supports custom objects', function test( t ) {
198-
var bool;
199-
function Person() {}
200-
bool = isObjectLike( new Person() );
201-
t.equal( bool, true, 'returns true' );
202-
t.end();
203-
});
204-
205-
// TODO: add generator function test

0 commit comments

Comments
 (0)