Comparing version 1.4.1 to 1.4.2
@@ -1,2 +0,21 @@ | ||
Copyright (c) 2010-2012 Robert Kieffer | ||
MIT License - http://opensource.org/licenses/mit-license.php | ||
The MIT License (MIT) | ||
Copyright (c) 2010-2012 Robert Kieffer | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
@@ -10,6 +10,18 @@ { | ||
], | ||
"bin": { | ||
"uuid": "./bin/uuid" | ||
}, | ||
"scripts": { | ||
"test": "node test/test.js" | ||
}, | ||
"lib" : ".", | ||
"main" : "./uuid.js", | ||
"repository" : { "type" : "git", "url" : "https://github.com/broofa/node-uuid.git" }, | ||
"version" : "1.4.1" | ||
"version" : "1.4.2", | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://raw.github.com/broofa/node-uuid/master/LICENSE.md" | ||
} | ||
] | ||
} |
@@ -13,2 +13,3 @@ # node-uuid | ||
* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) | ||
* Comes with a Command Line Interface for generating uuids on the command line | ||
@@ -164,2 +165,38 @@ ## Getting Started | ||
## Command Line Interface | ||
To use the executable, it's probably best to install this library globally. | ||
`npm install -g node-uuid` | ||
Usage: | ||
``` | ||
USAGE: uuid [version] [options] | ||
options: | ||
--help Display this message and exit | ||
``` | ||
`version` must be an RFC4122 version that is supported by this library, which is currently version 1 and version 4 (denoted by "v1" and "v4", respectively). `version` defaults to version 4 when not supplied. | ||
### Examples | ||
``` | ||
> uuid | ||
3a91f950-dec8-4688-ba14-5b7bbfc7a563 | ||
``` | ||
``` | ||
> uuid v1 | ||
9d0b43e0-7696-11e3-964b-250efa37a98e | ||
``` | ||
``` | ||
> uuid v4 | ||
6790ac7c-24ac-4f98-8464-42f6d98a53ae | ||
``` | ||
## Testing | ||
@@ -170,4 +207,3 @@ | ||
``` | ||
> cd test | ||
> node test.js | ||
npm test | ||
``` | ||
@@ -174,0 +210,0 @@ |
@@ -17,5 +17,5 @@ // uuid.js | ||
// Moderately fast, high quality | ||
if (typeof(require) == 'function') { | ||
if (typeof(_global.require) == 'function') { | ||
try { | ||
var _rb = require('crypto').randomBytes; | ||
var _rb = _global.require('crypto').randomBytes; | ||
_rng = _rb && function() {return _rb(16);}; | ||
@@ -53,3 +53,3 @@ } catch(e) {} | ||
// Buffer class to use | ||
var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array; | ||
var BufferClass = typeof(_global.Buffer) == 'function' ? _global.Buffer : Array; | ||
@@ -56,0 +56,0 @@ // Maps for number <-> hex string conversion |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
37213
15
0
100
244