Skip to content

Commit

Permalink
Remove usage of _.keys.
Browse files Browse the repository at this point in the history
relates to #68
  • Loading branch information
Shahar Soel committed Jan 2, 2016
1 parent 39c38c1 commit 8fb7e29
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lang/lang_extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace chevrotain.lang {
private _state = {}

keys():string[] {
return _.keys(this._state)
return utils.keys(this._state)
}

values():V[] {
Expand Down
2 changes: 1 addition & 1 deletion src/parse/grammar/lookahead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ namespace chevrotain.lookahead {
})
})

let altsIndicesTokenAppearsIn = _.map(_.keys(altsCurrTokenAppearsIn), (index) => {
let altsIndicesTokenAppearsIn = _.map(utils.keys(altsCurrTokenAppearsIn), (index) => {
return parseInt(index, 10) + 1
})

Expand Down
4 changes: 4 additions & 0 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ namespace utils {
export function isEmpty(arr:any[]) {
return arr.length === 0
}

export function keys(obj:any) {
return Object.keys(obj)
}
}

0 comments on commit 8fb7e29

Please sign in to comment.