diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..13e80f2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,33 @@ +# Change Log + +## [Unreleased](https://github.com/fgribreau/node-unidecode/tree/HEAD) + +[Full Changelog](https://github.com/fgribreau/node-unidecode/compare/v0.1.5...HEAD) + +**Merged pull requests:** + +- Bundler friendly \(and ES6 compatible\) requires [\#5](https://github.com/FGRibreau/node-unidecode/pull/5) ([medikoo](https://github.com/medikoo)) + +- Add transliteration for δΈ€ \(U4E00\) [\#4](https://github.com/FGRibreau/node-unidecode/pull/4) ([halfdan](https://github.com/halfdan)) + +## [v0.1.5](https://github.com/fgribreau/node-unidecode/tree/v0.1.5) (2015-04-19) + +[Full Changelog](https://github.com/fgribreau/node-unidecode/compare/v0.1.4...v0.1.5) + +## [v0.1.4](https://github.com/fgribreau/node-unidecode/tree/v0.1.4) (2015-04-19) + +**Fixed bugs:** + +- Error: Cannot find module './data/x1d.js' [\#1](https://github.com/FGRibreau/node-unidecode/issues/1) + +**Merged pull requests:** + +- Lint and fix bad escaping [\#8](https://github.com/FGRibreau/node-unidecode/pull/8) ([commenthol](https://github.com/commenthol)) + +- Testcases [\#7](https://github.com/FGRibreau/node-unidecode/pull/7) ([commenthol](https://github.com/commenthol)) + +- fix replacement for \[ [\#3](https://github.com/FGRibreau/node-unidecode/pull/3) ([c089](https://github.com/c089)) + + + +\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/README.md b/README.md index e79f4f3..7775085 100755 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ Note that all the files named 'x??.js' in data are derived directly from the equ * Port Text::Unicode unit-test to JavaScript +## [Changelog](/CHANGELOG.md) + ## Donate [Donate Bitcoins](https://coinbase.com/checkouts/fc3041b9d8116e0b98e7d243c4727a30) diff --git a/scripts/changelog b/scripts/changelog new file mode 100755 index 0000000..6e40784 --- /dev/null +++ b/scripts/changelog @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +# gem install github_changelog_generator +github_changelog_generator -u fgribreau -p node-unidecode diff --git a/scripts/ci/start b/scripts/ci/start new file mode 100755 index 0000000..45fbd59 --- /dev/null +++ b/scripts/ci/start @@ -0,0 +1,24 @@ +#!/usr/bin/env zsh + +wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.21.0/install.sh | bash +source ~/.nvm/nvm.sh + +nvm install +nvm use + +npm install + +node -v +npm -v + +npm install + +set -e + +# Any subsequent commands which fail will cause the shell script to exit immediately +setopt extended_glob; + +npm test + +#npm install check-build -g +#check-build diff --git a/unidecode.js b/unidecode.js index d23e706..8e8d832 100644 --- a/unidecode.js +++ b/unidecode.js @@ -16,7 +16,7 @@ var tr = {}; var utf8_rx = /(?![\x00-\x7F]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3})./g; -module.exports = function(str) { +module.exports = function (str) { return str.replace(utf8_rx, unidecode_internal_replace); }; @@ -594,8 +594,8 @@ function dec2hex(i) { function utf8_to_utf16(raw) { var b1, b2, b3, b4, - x, y, z; - + x, y, z; + while (Array.isArray(raw)) raw = raw[0]; switch (raw.length) {