Comments (4)
Heyy @kgryte I think I have figured this out, please assign me this task. Thank You.
from stdlib.
function isNonPositiveFinite(value) {
return typeof value === 'number' && !isNaN(value) && value <= 0 && isFinite(value);
}
This should almost work and have another solution as well
from stdlib.
@dainik10 The solution outline should work; however, it is not likely to be accepted as is. Instead, you should use stdlib functions, not built-in globals. E.g., see https://github.com/stdlib-js/stdlib/blob/develop/lib/node_modules/%40stdlib/assert/is-nonpositive-number/lib/primitive.js.
Instead of isFinite
, you can test directly against @stdlib/constants/float64/ninf
.
from stdlib.
I'll go ahead and assign you this task. Please feel free to submit a PR.
from stdlib.
Related Issues (20)
- [RFC]: Add C implementation for `@stdlib/math/base/special/fibonacci` HOT 2
- [RFC]: Refactor `function/docs/types` to follow current project conventions HOT 2
- [RFC]: Add C implementation for `@stdlib/math/base/special/fibonacci-index` HOT 3
- [RFC]: Add C implementation for `@stdlib/math/base/special/negafibonacci` HOT 4
- [RFC]: add C implementation for `@stdlib/math/base/assert/is-negative-integer` HOT 6
- [RFC]: add prompt marker to make multi-line code more readable in the REPL HOT 7
- [RFC]: add C implementation for `@stdlib/math/base/assert/is-positive-integer` HOT 1
- [RFC]: Add auto-completion preview for REPL HOT 2
- [RFC]: add object inspection on the fly in REPL HOT 6
- [RFC]: feat: add C implementation for `@stdlib/math/base/assert/int32-is-even` HOT 3
- [RFC]: feat: add C implementation for `@stdlib/math/base/assert/int32-is-odd` HOT 2
- [RFC]: add `utils/async/parallel` HOT 11
- [RFC]: add C implementation for `math/base/special/xlogy` HOT 3
- [RFC]: add C implementation for `@stdlib/math/base/special/csch` HOT 2
- [RFC]: add C implementation for @stdlib/math/base/special/csc. HOT 3
- [RFC]: add C implementation for `@stdlib/math/base/special/gamma-lanczos-sum` HOT 2
- [RFC]: add C implementation for @stdlib/math/base/special/maxabsn HOT 4
- [RFC]: add C implementation for @stdlib/math/base/assert /is-nonnegative-finite HOT 1
- [RFC]: add C implementation for `@stdlib/math/base/assert/is-nonpositive-finite` HOT 5
- [RFC]: add C implementation for `@stdlib/math/base/special/gamma-lanczos-sum-expg-scaled` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stdlib.