Comments (5)
Yup, that is the major issue. Maintaining a single path has helped keep the library short and simple. It has been requested sporadically in the past #136 #254 #267 and 2 out of 3 times it was lack of information about promises
In the case that it was actually a limitation, I suggested deasync, which ends up being a good solution as you'll likely have to handle other async dependencies in your code. So I consider it a win-win 😉
the fact that exists has been deprecated in favour of existsSync would suggest the opposite
That's not the case though. It has been superseded by stat
or access
and the removal has more to do with the fact there is a race condition when checking if a file exists prior to operating with it, so it's better to just try the operation and catch the error
from node-argon2.
What's the niche use case you have in mind?
from node-argon2.
Something like this
https://stackoverflow.com/a/64200074
Also I don't see why someone couldn't be able to choose a synchronous function
from node-argon2.
Also I don't see why someone couldn't be able to choose a synchronous function
It's a matter of maintaining extra code in order to support a scenario that hasn't really happened in the past years. Even the native Node modules now have a promises
version (i.e. fs/promises
and readline/promises
)
You can use deasync
if you really want use synchronous calls, though I highly recommend against
from node-argon2.
I don't see a relation between the promises version of fs and having a synchronous version for this library.
The promises thing has been introduced because otherwise it would have worked with the ugly old-style callbacks and one would have had to create promises to be able to use async/await
Actually the fact that there are sync. versions for most of the functions (such as readdirSync) and the fact that exists has been deprecated in favour of existsSync would suggest the opposite.
Still, I understand if you don't want to have more code to maintain
from node-argon2.
Related Issues (20)
- Hash in .Net and Verify in node.js HOT 6
- Cannot build anymore from yesterday: Cannot find module './**/*' HOT 8
- How to cache the Argon2 binary for CI? HOT 1
- Bun support HOT 1
- how to install with local argon2.node HOT 1
- v0.40.0-alpha.2 raises ts errors HOT 2
- node18.14.0 node-gyp10.0.1 Error message reported during installation of argon2 HOT 2
- How to hash without salt? HOT 2
- Crash with docker HOT 2
- `defaults` is no longer exported in v0.40.0 HOT 2
- Mismatching version numbers on github releases and npm (0.40.0 vs 0.40.1) HOT 2
- node-gyp-build error HOT 4
- Doesn't work in the node:20-alpine image docker HOT 24
- Type regression between v0.31.2 and v0.40.1 HOT 5
- ReferenceError: require is not defined HOT 1
- Centos8 error: "symbol lookup error: undefined symbol: argon2_ctx" HOT 1
- Invalid argument on verify method HOT 4
- 0.40 prebuild fails on Debian bullseye arm64 linux as GLIBC 2.34 is required HOT 2
- argon2 package.json is not node-pre-gyp ready HOT 3
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 node-argon2.