Skip to content

Commit

Permalink
docs: fix typos (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR authored and bcoe committed Aug 20, 2019
1 parent 89d5a15 commit d3d9027
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function parse (args, opts) {
key = arg.match(negatedBoolean)[1]
setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false)

// -- seperated by space.
// -- separated by space.
} else if (arg.match(/^--.+/) || (
!configuration['short-option-groups'] && arg.match(/^-[^-]+/)
)) {
Expand Down Expand Up @@ -196,12 +196,12 @@ function parse (args, opts) {
}
}

// dot-notation flag seperated by '='.
// dot-notation flag separated by '='.
} else if (arg.match(/^-.\..+=/)) {
m = arg.match(/^-([^=]+)=([\s\S]*)$/)
setArg(m[1], m[2])

// dot-notation flag seperated by space.
// dot-notation flag separated by space.
} else if (arg.match(/^-.\..+/)) {
next = args[i + 1]
key = arg.match(/^-(.\..+)/)[1]
Expand Down
2 changes: 1 addition & 1 deletion test/tokenize-arg-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('TokenizeArgString', function () {
args[2].should.equal('--bar=""')
})

it('handles quoted string with embeded quotes', function () {
it('handles quoted string with embedded quotes', function () {
var args = tokenizeArgString('--foo "hello \'world\'" --bar=\'foo "bar"\'')
args[0].should.equal('--foo')
args[1].should.equal('"hello \'world\'"')
Expand Down
6 changes: 3 additions & 3 deletions test/yargs-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('yargs-parser', function () {
parse.should.have.property('_').with.length(0)
})

it('should explicitly set a boolean option to false if preceeded by "--no-"', function () {
it('should explicitly set a boolean option to false if preceded by "--no-"', function () {
var parse = parser(['--no-moo'])
parse.should.have.property('moo', false)
parse.should.have.property('_').with.length(0)
Expand Down Expand Up @@ -894,12 +894,12 @@ describe('yargs-parser', function () {
argv.foo.bar.cool.should.eql(11)
})

it("should allow flags to use dot notation, when seperated by '='", function () {
it("should allow flags to use dot notation, when separated by '='", function () {
var argv = parser(['-f.foo=99'])
argv.f.foo.should.eql(99)
})

it("should allow flags to use dot notation, when seperated by ' '", function () {
it("should allow flags to use dot notation, when separated by ' '", function () {
var argv = parser(['-f.foo', '99'])
argv.f.foo.should.eql(99)
})
Expand Down

0 comments on commit d3d9027

Please sign in to comment.