File tree Expand file tree Collapse file tree 18 files changed +470
-0
lines changed
lib/node_modules/@stdlib/assert Expand file tree Collapse file tree 18 files changed +470
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * @license Apache-2.0
3+ *
4+ * Copyright (c) 2019 The Stdlib Authors.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
18+
19+ // TypeScript Version: 2.0
20+
21+ /**
22+ * Tests if a value is an array of arrays.
23+ *
24+ * @param value - value to test
25+ * @returns boolean indicating whether a value is an array of arrays
26+ *
27+ * @example
28+ * var bool = isArrayArray( [ [], [] ] );
29+ * // returns true
30+ *
31+ * bool = isArrayArray( [ {}, {} ] );
32+ * // returns false
33+ *
34+ * bool = isArrayArray( [] );
35+ * // returns false
36+ */
37+ declare function isArrayArray ( value : any ) : boolean ;
38+
39+
40+ // EXPORTS //
41+
42+ export = isArrayArray ;
Original file line number Diff line number Diff line change 1+ /*
2+ * @license Apache-2.0
3+ *
4+ * Copyright (c) 2019 The Stdlib Authors.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
18+
19+ import isArrayArray = require( './index' ) ;
20+
21+
22+ // TESTS //
23+
24+ // The function returns a boolean...
25+ {
26+ isArrayArray ( { } ) ; // $ExpectType boolean
27+ isArrayArray ( [ [ ] , [ ] ] ) ; // $ExpectType boolean
28+ }
29+
30+ // The compiler throws an error if the function is provided an unsupported number of arguments...
31+ {
32+ isArrayArray ( ) ; // $ExpectError
33+ isArrayArray ( [ [ ] , [ ] ] , 123 ) ; // $ExpectError
34+ }
Original file line number Diff line number Diff line change 2121 "lib" : " ./lib" ,
2222 "test" : " ./test"
2323 },
24+ "types" : " ./docs/types" ,
2425 "scripts" : {},
2526 "homepage" : " https://github.com/stdlib-js/stdlib" ,
2627 "repository" : {
Original file line number Diff line number Diff line change 1+ /*
2+ * @license Apache-2.0
3+ *
4+ * Copyright (c) 2019 The Stdlib Authors.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
18+
19+ // TypeScript Version: 2.0
20+
21+ /**
22+ * Tests if a value is a valid array length.
23+ *
24+ * ## Notes
25+ *
26+ * - A valid length property for an Array instance is any integer value on the interval [0, 2^32-1].
27+ *
28+ * @param value - value to test
29+ * @returns boolean indicating if a value is a valid array length
30+ *
31+ * @example
32+ * var bool = isArrayLength( 3 );
33+ * // returns true
34+ *
35+ * @example
36+ * var bool = isArrayLength( 3.14 );
37+ * // returns false
38+ */
39+ declare function isArrayLength ( value : any ) : boolean ;
40+
41+
42+ // EXPORTS //
43+
44+ export = isArrayLength ;
Original file line number Diff line number Diff line change 1+ /*
2+ * @license Apache-2.0
3+ *
4+ * Copyright (c) 2019 The Stdlib Authors.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
18+
19+ import isArrayLength = require( './index' ) ;
20+
21+
22+ // TESTS //
23+
24+ // The function returns a boolean...
25+ {
26+ isArrayLength ( 3 ) ; // $ExpectType boolean
27+ isArrayLength ( 3.14 ) ; // $ExpectType boolean
28+ }
29+
30+ // The compiler throws an error if the function is provided an unsupported number of arguments...
31+ {
32+ isArrayLength ( ) ; // $ExpectError
33+ isArrayLength ( 9 , 123 ) ; // $ExpectError
34+ }
Original file line number Diff line number Diff line change 2121 "lib" : " ./lib" ,
2222 "test" : " ./test"
2323 },
24+ "types" : " ./docs/types" ,
2425 "scripts" : {},
2526 "homepage" : " https://github.com/stdlib-js/stdlib" ,
2627 "repository" : {
Original file line number Diff line number Diff line change 1+ /*
2+ * @license Apache-2.0
3+ *
4+ * Copyright (c) 2019 The Stdlib Authors.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
18+
19+ // TypeScript Version: 2.0
20+
21+ /**
22+ * Tests if a value is an array-like object.
23+ *
24+ * ## Notes
25+ *
26+ * - If provided a string, the function returns `false`.
27+ *
28+ * @param value - value to test
29+ * @returns boolean indicating if a value is an array-like object
30+ *
31+ * @example
32+ * var bool = isArrayLikeObject( [] );
33+ * // returns true
34+ *
35+ * @example
36+ * var bool = isArrayLikeObject( { 'length':10 } );
37+ * // returns true
38+ *
39+ * @example
40+ * var bool = isArrayLikeObject( 'beep' );
41+ * // returns false
42+ */
43+ declare function isArrayLike ( value : any ) : boolean ;
44+
45+
46+ // EXPORTS //
47+
48+ export = isArrayLike ;
Original file line number Diff line number Diff line change 1+ /*
2+ * @license Apache-2.0
3+ *
4+ * Copyright (c) 2019 The Stdlib Authors.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
18+
19+ import isArrayLikeObject = require( './index' ) ;
20+
21+
22+ // TESTS //
23+
24+ // The function returns a boolean...
25+ {
26+ isArrayLikeObject ( [ ] ) ; // $ExpectType boolean
27+ isArrayLikeObject ( 'beep' ) ; // $ExpectType boolean
28+ }
29+
30+ // The compiler throws an error if the function is provided an unsupported number of arguments...
31+ {
32+ isArrayLikeObject ( ) ; // $ExpectError
33+ isArrayLikeObject ( [ ] , 123 ) ; // $ExpectError
34+ }
Original file line number Diff line number Diff line change 2121 "lib" : " ./lib" ,
2222 "test" : " ./test"
2323 },
24+ "types" : " ./docs/types" ,
2425 "scripts" : {},
2526 "homepage" : " https://github.com/stdlib-js/stdlib" ,
2627 "repository" : {
Original file line number Diff line number Diff line change 1+ /*
2+ * @license Apache-2.0
3+ *
4+ * Copyright (c) 2019 The Stdlib Authors.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
18+
19+ // TypeScript Version: 2.0
20+
21+ /**
22+ * Tests if a value is array-like.
23+ *
24+ * ## Notes
25+ *
26+ * - If provided a string, the function returns `true`.
27+ *
28+ * @param value - value to test
29+ * @returns boolean indicating if a value is array-like
30+ *
31+ * @example
32+ * var bool = isArrayLike( [] );
33+ * // returns true
34+ *
35+ * @example
36+ * var bool = isArrayLike( {'length':10} );
37+ * // returns true
38+ */
39+ declare function isArrayLike ( value : any ) : boolean ;
40+
41+
42+ // EXPORTS //
43+
44+ export = isArrayLike ;
You can’t perform that action at this time.
0 commit comments