Comparing version 0.9.1 to 0.10.0
## Changelog | ||
- 0.10.0 | ||
- Added `args` (alias for `params`) | ||
- Added `arg` (alias for `param`) | ||
- 0.9.0 | ||
@@ -4,0 +8,0 @@ - Added `date-fns` as helpers so they are available all the time :-) |
@@ -36,2 +36,4 @@ /** | ||
param: utils.param, | ||
args: utils.params, | ||
arg: utils.param, | ||
padLeft: utils.padLeft, | ||
@@ -38,0 +40,0 @@ padStart: utils.padLeft, |
{ | ||
"name": "cd-utils", | ||
"version": "0.9.1", | ||
"version": "0.10.0", | ||
"description": "CodeDungeon Utilities [WIP]", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -23,3 +23,3 @@ // MODULE TEST | ||
beforeEach(function(){ | ||
str = 'Mike Erickson' | ||
str = 'Mike Erickson'; | ||
pluralize = utils.pluralize; | ||
@@ -136,2 +136,9 @@ }); | ||
it('should have arguments', function() { | ||
args = utils.args(); | ||
if ( utils.is.object(args) ) { | ||
args.should.be.a('object').and.not.be.empty; | ||
} | ||
}); | ||
it('should retrieve parameter from command line parameters', function() { | ||
@@ -148,2 +155,13 @@ | ||
it('should retrieve argument from command line arguments', function() { | ||
// ticket number (example -t 7000) will be cast to number | ||
value = utils.arg('t'); | ||
if ( utils.is.number(value) ) { | ||
expect(value).to.be.number; | ||
} else { | ||
expect(value).to.be.object; | ||
} | ||
}) | ||
it('should pad left supplied string', function(){ | ||
@@ -150,0 +168,0 @@ result = utils.padLeft(str, 20); |
@@ -30,3 +30,3 @@ /** | ||
// Keep gulp from hanging on this task | ||
//this.emit('end'); | ||
this.emit('end'); | ||
}; |
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
34152
705