diff options
author | Valerio Virgillito | 2012-02-03 12:20:10 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-03 12:20:10 -0800 |
commit | e6e539f345f5e1ac36a595db5d1a1c3700715e88 (patch) | |
tree | 39846bf1570f9b5a4057b726c54905de9e9e1c02 /node_modules/montage/core/uuid.js | |
parent | 7950424cf704bb221971f4645406b01e6979db18 (diff) | |
parent | c630ead20487c3948fa36448d3e7d5f7b5cba782 (diff) | |
download | ninja-e6e539f345f5e1ac36a595db5d1a1c3700715e88.tar.gz |
Merge branch 'master' into components
Conflicts:
node_modules/montage/ui/bluemoon/progress.reel/progress.html
node_modules/montage/ui/image2.reel/image2.html
node_modules/ninja-components/effect/desaturate-effect.js
node_modules/ninja-components/effect/effect.js
node_modules/ninja-components/effect/invert-effect.js
node_modules/ninja-components/effect/kaliedoscope-effect.js
node_modules/ninja-components/effect/multiply-effect.js
node_modules/ninja-components/effect/sepia-effect.js
node_modules/ninja-components/flow-controller.reel/flow-controller.html
node_modules/ninja-components/flow-controller.reel/flow-controller.js
node_modules/ninja-components/flow-offset.js
node_modules/ninja-components/hottext.reel/hottext.css
node_modules/ninja-components/hottext.reel/hottext.html
node_modules/ninja-components/hottext.reel/hottext.js
node_modules/ninja-components/hottextunit.reel/hottextunit.css
node_modules/ninja-components/hottextunit.reel/hottextunit.html
node_modules/ninja-components/hottextunit.reel/hottextunit.js
node_modules/ninja-components/image2.reel/image2.html
node_modules/ninja-components/image2.reel/image2.js
node_modules/ninja-components/image3d.reel/image3d.html
node_modules/ninja-components/image3d.reel/image3d.js
node_modules/ninja-components/photo-editor.reel/photo-editor.css
node_modules/ninja-components/photo-editor.reel/photo-editor.html
node_modules/ninja-components/photo-editor.reel/photo-editor.js
node_modules/ninja-components/slider-base.js
user-document-templates/montage-application-cloud/appdelegate.js
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'node_modules/montage/core/uuid.js')
-rwxr-xr-x | node_modules/montage/core/uuid.js | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/node_modules/montage/core/uuid.js b/node_modules/montage/core/uuid.js index d2642107..09d9acec 100755 --- a/node_modules/montage/core/uuid.js +++ b/node_modules/montage/core/uuid.js | |||
@@ -16,59 +16,59 @@ | |||
16 | @class module:montage/core/uuid.Uuid | 16 | @class module:montage/core/uuid.Uuid |
17 | @extends module:montage/core/core.Montage | 17 | @extends module:montage/core/core.Montage |
18 | */ | 18 | */ |
19 | var Montage = require("montage").Montage, | 19 | var CHARS = '0123456789ABCDEF'.split(''), |
20 | CHARS = '0123456789ABCDEF'.split(''), | ||
21 | FORMAT = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.split(''), | 20 | FORMAT = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.split(''), |
22 | 21 | Uuid = exports.Uuid = Object.create(Object.prototype, /** @lends module:montage/core/uuid.Uuid# */ { | |
23 | Uuid = exports.Uuid = Montage.create(Montage,/** @lends module:montage/core/uuid.Uuid# */ { | 22 | /** |
24 | 23 | Returns a univerally unique ID (UUID). | |
25 | /** | 24 | @function |
26 | Returns a univerally unique ID (UUID). | 25 | @param {Property} argument |
27 | @function | 26 | @returns {String} The UUID. |
28 | @param {Property} argument | 27 | */ |
29 | @returns {String} The UUID. | ||
30 | */ | ||
31 | generate: { | 28 | generate: { |
32 | enumerable: false, | 29 | enumerable: false, |
33 | value: function generate(argument) { | 30 | value: generate |
34 | var c = CHARS, id = FORMAT, r; | 31 | } |
32 | }); | ||
35 | 33 | ||
36 | id[0] = c[(r = Math.random() * 0x100000000) & 0xf]; | 34 | exports.generate = generate; |
37 | id[1] = c[(r >>>= 4) & 0xf]; | 35 | function generate(argument) { |
38 | id[2] = c[(r >>>= 4) & 0xf]; | 36 | var c = CHARS, id = FORMAT, r; |
39 | id[3] = c[(r >>>= 4) & 0xf]; | ||
40 | id[4] = c[(r >>>= 4) & 0xf]; | ||
41 | id[5] = c[(r >>>= 4) & 0xf]; | ||
42 | id[6] = c[(r >>>= 4) & 0xf]; | ||
43 | id[7] = c[(r >>>= 4) & 0xf]; | ||
44 | 37 | ||
45 | id[9] = c[(r = Math.random() * 0x100000000) & 0xf]; | 38 | id[0] = c[(r = Math.random() * 0x100000000) & 0xf]; |
46 | id[10] = c[(r >>>= 4) & 0xf]; | 39 | id[1] = c[(r >>>= 4) & 0xf]; |
47 | id[11] = c[(r >>>= 4) & 0xf]; | 40 | id[2] = c[(r >>>= 4) & 0xf]; |
48 | id[12] = c[(r >>>= 4) & 0xf]; | 41 | id[3] = c[(r >>>= 4) & 0xf]; |
49 | id[15] = c[(r >>>= 4) & 0xf]; | 42 | id[4] = c[(r >>>= 4) & 0xf]; |
50 | id[16] = c[(r >>>= 4) & 0xf]; | 43 | id[5] = c[(r >>>= 4) & 0xf]; |
51 | id[17] = c[(r >>>= 4) & 0xf]; | 44 | id[6] = c[(r >>>= 4) & 0xf]; |
45 | id[7] = c[(r >>>= 4) & 0xf]; | ||
52 | 46 | ||
53 | id[19] = c[(r = Math.random() * 0x100000000) & 0x3 | 0x8]; | 47 | id[9] = c[(r = Math.random() * 0x100000000) & 0xf]; |
54 | id[20] = c[(r >>>= 4) & 0xf]; | 48 | id[10] = c[(r >>>= 4) & 0xf]; |
55 | id[21] = c[(r >>>= 4) & 0xf]; | 49 | id[11] = c[(r >>>= 4) & 0xf]; |
56 | id[22] = c[(r >>>= 4) & 0xf]; | 50 | id[12] = c[(r >>>= 4) & 0xf]; |
57 | id[24] = c[(r >>>= 4) & 0xf]; | 51 | id[15] = c[(r >>>= 4) & 0xf]; |
58 | id[25] = c[(r >>>= 4) & 0xf]; | 52 | id[16] = c[(r >>>= 4) & 0xf]; |
59 | id[26] = c[(r >>>= 4) & 0xf]; | 53 | id[17] = c[(r >>>= 4) & 0xf]; |
60 | id[27] = c[(r >>>= 4) & 0xf]; | ||
61 | 54 | ||
62 | id[28] = c[(r = Math.random() * 0x100000000) & 0xf]; | 55 | id[19] = c[(r = Math.random() * 0x100000000) & 0x3 | 0x8]; |
63 | id[29] = c[(r >>>= 4) & 0xf]; | 56 | id[20] = c[(r >>>= 4) & 0xf]; |
64 | id[30] = c[(r >>>= 4) & 0xf]; | 57 | id[21] = c[(r >>>= 4) & 0xf]; |
65 | id[31] = c[(r >>>= 4) & 0xf]; | 58 | id[22] = c[(r >>>= 4) & 0xf]; |
66 | id[32] = c[(r >>>= 4) & 0xf]; | 59 | id[24] = c[(r >>>= 4) & 0xf]; |
67 | id[33] = c[(r >>>= 4) & 0xf]; | 60 | id[25] = c[(r >>>= 4) & 0xf]; |
68 | id[34] = c[(r >>>= 4) & 0xf]; | 61 | id[26] = c[(r >>>= 4) & 0xf]; |
69 | id[35] = c[(r >>>= 4) & 0xf]; | 62 | id[27] = c[(r >>>= 4) & 0xf]; |
70 | 63 | ||
71 | return id.join(''); | 64 | id[28] = c[(r = Math.random() * 0x100000000) & 0xf]; |
72 | } | 65 | id[29] = c[(r >>>= 4) & 0xf]; |
73 | } | 66 | id[30] = c[(r >>>= 4) & 0xf]; |
74 | }); | 67 | id[31] = c[(r >>>= 4) & 0xf]; |
68 | id[32] = c[(r >>>= 4) & 0xf]; | ||
69 | id[33] = c[(r >>>= 4) & 0xf]; | ||
70 | id[34] = c[(r >>>= 4) & 0xf]; | ||
71 | id[35] = c[(r >>>= 4) & 0xf]; | ||
72 | |||
73 | return id.join(''); | ||
74 | } | ||