forked from mapbox/tokml
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update dev dependencies to fix tests, ignore libs
- Loading branch information
Showing
4 changed files
with
314 additions
and
947 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
/* istanbul ignore file */ | ||
// originally from https://github.com/miketheprogrammer/xml-escape | ||
|
||
var escape = (module.exports = function escape(string, ignore) { | ||
var pattern; | ||
var pattern | ||
|
||
if (string === null || string === undefined) return; | ||
if (string === null || string === undefined) return | ||
|
||
ignore = (ignore || "").replace(/[^&"<>\']/g, ""); | ||
pattern = "([&\"<>'])".replace(new RegExp("[" + ignore + "]", "g"), ""); | ||
ignore = (ignore || '').replace(/[^&"<>\']/g, '') | ||
pattern = '([&"<>\'])'.replace(new RegExp('[' + ignore + ']', 'g'), '') | ||
|
||
return string.replace(new RegExp(pattern, "g"), function (str, item) { | ||
return escape.map[item]; | ||
}); | ||
}); | ||
return string.replace(new RegExp(pattern, 'g'), function (str, item) { | ||
return escape.map[item] | ||
}) | ||
}) | ||
|
||
var map = (escape.map = { | ||
">": ">", | ||
"<": "<", | ||
"'": "'", | ||
'"': """, | ||
"&": "&", | ||
}); | ||
'>': '>', | ||
'<': '<', | ||
"'": ''', | ||
'"': '"', | ||
'&': '&' | ||
}) |
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
Oops, something went wrong.