Skip to content

Instantly share code, notes, and snippets.

@luochen1990
Last active November 7, 2017 06:51
Show Gist options
  • Save luochen1990/03b7b2707fa9b5d678288b34bca25b75 to your computer and use it in GitHub Desktop.
Save luochen1990/03b7b2707fa9b5d678288b34bca25b75 to your computer and use it in GitHub Desktop.
Check if NODE_ICU_DATA is configured correctly. 检查 NODE ICU DATA 的配置是否正确.
node --print "['吃', '矮', '笨', 'c', 'a', 'b'].sort((a, b) => a.localeCompare(b, 'zh-Hans-CN')).join('') === '矮笨吃abc'"
# Expected Output: true
node --print "['吃', '矮', '笨', 'c', 'a', 'b'].sort((a, b) => a.localeCompare(b, 'zh-Hans-CN'))"
# Expected Output: [ '矮', '笨', '吃', 'a', 'b', 'c' ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment