-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring: remove replaceUnwantedChar from abe-util
- Loading branch information
nicolaslabbe
committed
Oct 5, 2016
1 parent
434e734
commit 271bd58
Showing
8 changed files
with
59 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {Util} from '../../../' | ||
import {coreUtils} from '../../../' | ||
|
||
export default function cleanTab(obj) { | ||
obj = Util.replaceUnwantedChar(obj.replace(/ |&/g, '_')) | ||
obj = coreUtils.text.replaceUnwantedChar(obj.replace(/ |&/g, '_')) | ||
|
||
return obj | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import * as sort from './sort' | ||
import * as text from './text' | ||
|
||
export { | ||
sort | ||
,text | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
var chai = require('chai'); | ||
var coreUtils = require('../src/cli').coreUtils | ||
|
||
describe('Util', function() { | ||
|
||
/** | ||
* coreUtils.text.replaceUnwantedChar | ||
* | ||
*/ | ||
it('coreUtils.text.replaceUnwantedChar', function() { | ||
var list = coreUtils.text.replaceUnwantedChar('Š') | ||
chai.expect(list.indexOf('Š')).to.equal(-1); | ||
}); | ||
}); |