Comments (4)
Hey @binarykitchen -- Thanks for the suggestion but I'm going to keep it as-is for now, here's the rationale:
- minification -- {matching,scoring,adjacency_graphs,frequency_lists,init}.js are all unminified and together constitute zxcvbn.js. If you want unminified files, whether for debugging purposes, for using your own bundler, etc, I would argue it's better to work with this set vs an unminified bundle.
- resource vs source -- I agree with your point, however because the zxcvbn build step currently depends on python and java, I don't want to force every client to have to build zxcvbn themselves. I realize it's inelegant to see
zxcvbn.js
diffs in nearly every commit. It's on my roadmap to remove python and java dependencies and build entirely within the node ecosystem, at which point I'll revisit removingzxcvbn.js
from source control.
from zxcvbn.
- No. Problem is that
module.exports = require('./zxcvbn').zxcvbn;
in your index.js is requiring the minified version. If you expect me to do arequire('./zxcvbn'). {matching,scoring,adjacency_graphs,frequency_lists,init};
i.E. in gulp before minification, then that's very bad practice. - Great. Please do that. For now, tell me why it depends on python and hava?
Furthermore you should include {matching,scoring,adjacency_graphs,frequency_lists}
into init.js through require()
instead of manually bundling them together.
from zxcvbn.
index.js
is no longer used anywhere and scheduled for removal in the next release. See the end of init.coffee to see how export works (it doesn't referencezxcvbn.js
). I don't see a problem here.- I initially wrote this in 2012 and closure (java) provided the best size reduction. I'm considering switching to uglifyjs to remove the java dependency even though it adds about 100kb vs closure. re: python, it was easier for me to write those scripts in python at the time, but should be easy to port to js.
- I likely won't ever use require anywhere internally in the lib because I want it to work outside of node / other CommonJS environments. Build dependencies on node are fine, but not runtime dependencies.
from zxcvbn.
I see ... okay then, see what happens in your next versions. Thanks for your hard work!
from zxcvbn.
Related Issues (20)
- Password File
- Electron app
- Code security
- Bypass password File HOT 2
- Creating Electron app
- README.md
- please delete this issue
- Password entropy property HOT 1
- Very slow for certain inputs
- recent year regex is... out of date. HOT 2
- Different score for the password strength for the same string between TypeScript and Java versions HOT 5
- 密码强度检测 HOT 1
- Just saying thanks
- Dead "Dropbox Blog Post" URL at demo site
- Possible DOS when run server side
- A ReDoS vulnerability exists in matching.coffee HOT 10
- Microsoft Edge component version showing wrong HOT 1
- Feature request: provide options for smaller builds
- Recommended successors? HOT 1
- I created a pure Swift version of this - how do I get it listed here?
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 zxcvbn.