-
-
Notifications
You must be signed in to change notification settings - Fork 835
feat: add assert/is-float16array
#7273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Coverage Report
The above coverage report was generated for the changes in this PR. |
lib/node_modules/@stdlib/assert/is-float16array/docs/types/index.d.ts
Outdated
Show resolved
Hide resolved
|
||
<!-- <related-links> --> | ||
|
||
[@stdlib/assert/is-float64array]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/assert/is-float64array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[@stdlib/assert/is-float64array]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/assert/is-float64array | |
[@stdlib/assert/is-float64array]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/assert/is-float64array | |
[@stdlib/assert/is-float32array]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/assert/is-float32array |
bool = isFloat16Array( new Float64Array( 10 ) ); | ||
// returns false | ||
|
||
bool = isFloat16Array( new Array( 10 ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line causes the lint error, I am not sure with the solution, maybe removing this be a option, maybe there be a better option, not sure about it.
/stdlib update-copyright-years |
Signed-off-by: Uday Kakade <141299403+udaykakade25@users.noreply.github.com>
Hello @kgryte sir, |
// MODULES // | ||
|
||
var nativeClass = require( '@stdlib/utils/native-class' ); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @returns {boolean} boolean indicating whether value is a Float16Array | ||
* | ||
* @example | ||
* var Float16Array = require( '@stdlib/array/float16/lib/polyfill.js' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to avoid loading internals of a package. Can we do var Float16Array = require( '@stdlib/array/float16' )
here?
var isFloat16Array = require( './../lib' ); | ||
|
||
// OPTIONS // | ||
|
||
var opts = { | ||
'skip': ( typeof Float16Array === 'undefined' ) | ||
}; | ||
|
||
// TESTS // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want two empty lines before header:
var isFloat16Array = require( './../lib' ); | |
// OPTIONS // | |
var opts = { | |
'skip': ( typeof Float16Array === 'undefined' ) | |
}; | |
// TESTS // | |
var isFloat16Array = require( './../lib' ); | |
// VARIABLES // | |
var opts = { | |
'skip': ( typeof Float16Array === 'undefined' ) | |
}; | |
// TESTS // |
var Float16Array = globalThis[ Symbol.for( '@@stdlib/array/float16' ) ]; | ||
|
||
var opts = { | ||
skip: ( typeof Float16Array !== 'function' ) | ||
}; | ||
|
||
// MAIN // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var Float16Array = globalThis[ Symbol.for( '@@stdlib/array/float16' ) ]; | |
var opts = { | |
skip: ( typeof Float16Array !== 'function' ) | |
}; | |
// MAIN // | |
var Float16Array = globalThis[ Symbol.for( '@@stdlib/array/float16' ) ]; | |
// VARIABLES // | |
var opts = { | |
skip: ( typeof Float16Array !== 'function' ) | |
}; | |
// MAIN // |
…' in main.js Signed-off-by: Uday Kakade <141299403+udaykakade25@users.noreply.github.com>
Signed-off-by: Uday Kakade <141299403+udaykakade25@users.noreply.github.com>
Signed-off-by: Uday Kakade <141299403+udaykakade25@users.noreply.github.com>
Resolves {https://github.com/stdlib-js/google-summer-of-code/issues/94}
Description
This pull request:
Related Issues
This pull request:
Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers