Last active
August 29, 2015 14:04
-
-
Save xnuk/fbba6bcb121599fb7369 to your computer and use it in GitHub Desktop.
일을 하자
This file contains hidden or 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
| (function(){ | |
| function switchreturn(compare, a){ | |
| for(var i in a.case) | |
| if(a.case[i][0].indexOf(compare)>-1)return a.case[i][1] | |
| return a.default | |
| } | |
| var one=function(){return 1} | |
| one.toString=function(a){ | |
| if(a==null || typeof a==='number' || (typeof a==='string' && (+a)+''!=='NaN') || typeof a!=='string')return '1' | |
| a=a.toLowerCase() | |
| return switchreturn(a.toLowerCase(), { | |
| 'case':[ | |
| [['ko', 'kor', 'korean'], '일'], | |
| [['ja', 'jpn', 'japanese', 'zh', 'chi', 'zho', 'chinese'], '一'], | |
| [['en', 'eng', 'english'], 'one'] | |
| ], | |
| 'default':'1' | |
| }) | |
| } | |
| one.stretch=function(){return '일이 늘어났다'} | |
| one.increase=function(){return '일이 너무 많아졌다'} | |
| one.decrease=function(){return '일이 줄어들지 않는다'} | |
| module.exports=one | |
| })(module) |
yous
commented
Aug 5, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment