monicao / angular-uuid4 Goto Github PK
View Code? Open in Web Editor NEWAngular service that generates UUIDs/GUIDs
Angular service that generates UUIDs/GUIDs
/angular-uuid4.js
and angular-uuid4.min.js
aren't up to date with /src/angular-uuid4.js
. Most noticeable difference is the missing validate
method, but there may be others.
Some UUIDs are not validating based on the regex found here. http://stackoverflow.com/questions/7905929/how-to-test-valid-uuid-guid
Need to read the rfc http://www.ietf.org/rfc/rfc4122.txt and figure out if the if the issue is with the generator or with the regex.
From the tests:
Expected '180cb47a-9f51-48b3-e745-1503370f5c23'
to match /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.
When I check the LICENSE.txt in this repository, angular-uuid4 is released under Apache-2.0.
However, in npm(https://www.npmjs.com/package/angular-uuid4), license information is written as MIT.
Just FYI, bower throws a warning because the version number in bower.json
is still 0.1.0
There is no npm module of this package. Could you please publish it?
Creating a UUID with uuid4.generate
and validating that UUID with uuid4.validate
sometimes fails.
Running in Karma/Jasmine:
var uuid = uuid4.generate();
expect(uuid4.validate(uuid)).toBe(true); // pot luck whether this passes
Sometimes passes, sometimes fails. No code or environment changes: The only difference is the generated UUID.
I've only been able to replicate this when running on PhantomJS running with Karma and Jasmine. I've tried replicating this in a real browser and was unable to replicate the issue (all generated UUIDs were valid).
I'm unsure of the limitations of PhantomJS and its implications on this library, or even if this is genuinely a compatibility issue with PhantomJS or something else entirely (though it seems like it is).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.