Skip to content
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

Recommend Sunsetting #1

Open
mdhornet90 opened this issue Dec 30, 2019 · 2 comments
Open

Recommend Sunsetting #1

mdhornet90 opened this issue Dec 30, 2019 · 2 comments

Comments

@mdhornet90
Copy link

Numerous advancements in the javascript language, particularly performance improvements in the parser, have made this kind of code portable enough that it no longer needs to be a library function. Recommend deprecating this library.

@soaxelbrooke
Copy link

There is a migration path for vanilla JS available also:

let sgn = x => x > 0 ? 1 : x < 0 ? -1 : 0;
console.log(sgn(100));
console.log(sgn(-100));
console.log(sgn(Infinity));

@1j01
Copy link

1j01 commented Oct 8, 2023

This package is just Math.sign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants