-
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
89 additions
and
0 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 |
---|---|---|
|
@@ -396,6 +396,7 @@ | |
"stringify", | ||
"stringifyAll", | ||
"stripAnsi", | ||
"stripBom", | ||
"stripCmt", | ||
"stripColor", | ||
"stripHtmlTag", | ||
|
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,8 @@ | ||
## CN | ||
|
||
清除 UTF-8 BOM。 | ||
|
||
|参数名|说明| | ||
|-----|---| | ||
|str|源字符串| | ||
|返回值|目标字符串| |
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,26 @@ | ||
/* Strip UTF-8 byte order mark. | ||
* | ||
* |Name |Desc | | ||
* |------|---------------| | ||
* |str |String to strip| | ||
* |return|Result string | | ||
*/ | ||
|
||
/* example | ||
* stripBom('\uFEFFlicia'); // -> 'licia' | ||
*/ | ||
|
||
/* module | ||
* env: all | ||
*/ | ||
|
||
/* typescript | ||
* export declare function stripBom(str: string): string; | ||
*/ | ||
|
||
exports = function(str) { | ||
if (str.charCodeAt(0) === 0xfeff) { | ||
return str.slice(1); | ||
} | ||
return str; | ||
}; |
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 @@ | ||
test(['\uFEFFlicia', 'licia']); |