Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.38 KB | None | 0 0
  1. /*
  2. * ascii_mapping.js - Javascript mapping of Unicode code page 437 to ASCII ordinals
  3. *
  4. * Code style:
  5. * 4 space indents, no semicolons to finish lines, camelCase, opening braces on same line
  6. *
  7. * Created by John Villar for the "Ganymede Gate" sci-fi multiplayer roguelike
  8. * Twitter: @johnvillarz
  9. * Reddit: /u/chiguireitor
  10. * Google Plus: +JohnVillar
  11. *
  12. * Like this! Follow me on social networks & send some Bitcoin my way if you want ;)
  13. *
  14. * BTC: 1kPp2CNp1xs7hf8umUwdp4HYiZ9AH1NVk
  15. *
  16. * // Beginning of license //
  17. *
  18. * The MIT License (MIT)
  19. *
  20. * Copyright (c) 2014 John Villar
  21. *
  22. * Permission is hereby granted, free of charge, to any person obtaining a copy
  23. * of this software and associated documentation files (the "Software"), to deal
  24. * in the Software without restriction, including without limitation the rights
  25. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  26. * copies of the Software, and to permit persons to whom the Software is
  27. * furnished to do so, subject to the following conditions:
  28. *
  29. * The above copyright notice and this permission notice shall be included in
  30. * all copies or substantial portions of the Software.
  31. *
  32. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  33. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  34. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  35. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  36. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  37. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  38. * THE SOFTWARE.
  39. *
  40. * // End of license //
  41. *
  42. */
  43. var asciiMapping = {
  44. "\u263A": 1,
  45. "\u263B": 2,
  46. "\u2665": 3,
  47. "\u2666": 4,
  48. "\u2663": 5,
  49. "\u2660": 6,
  50. "\u2022": 7,
  51. "\u25D8": 8,
  52. "\u25CB": 9,
  53. "\u25D9": 10,
  54. "\u2642": 11,
  55. "\u2640": 12,
  56. "\u266A": 13,
  57. "\u266B": 14,
  58. "\u263C": 15,
  59. "\u25BA": 16,
  60. "\u25C4": 17,
  61. "\u2195": 18,
  62. "\u203C": 19,
  63. "\u00B6": 20,
  64. "\u00A7": 21,
  65. "\u25AC": 22,
  66. "\u21A8": 23,
  67. "\u2191": 24,
  68. "\u2193": 25,
  69. "\u2192": 26,
  70. "\u2190": 27,
  71. "\u221F": 28,
  72. "\u2194": 29,
  73. "\u25B2": 30,
  74. "\u25BC": 31,
  75. "\u0020": 32,
  76. "\u0021": 33,
  77. "\u0022": 34,
  78. "\u0023": 35,
  79. "\u0024": 36,
  80. "\u0025": 37,
  81. "\u0026": 38,
  82. "\u0027": 39,
  83. "\u0028": 40,
  84. "\u0029": 41,
  85. "\u002A": 42,
  86. "\u002B": 43,
  87. "\u002C": 44,
  88. "\u002D": 45,
  89. "\u002E": 46,
  90. "\u002F": 47,
  91. "\u0030": 48,
  92. "\u0031": 49,
  93. "\u0032": 50,
  94. "\u0033": 51,
  95. "\u0034": 52,
  96. "\u0035": 53,
  97. "\u0036": 54,
  98. "\u0037": 55,
  99. "\u0038": 56,
  100. "\u0039": 57,
  101. "\u003A": 58,
  102. "\u003B": 59,
  103. "\u003C": 60,
  104. "\u003D": 61,
  105. "\u003E": 62,
  106. "\u003F": 63,
  107. "\u0040": 64,
  108. "\u0041": 65,
  109. "\u0042": 66,
  110. "\u0043": 67,
  111. "\u0044": 68,
  112. "\u0045": 69,
  113. "\u0046": 70,
  114. "\u0047": 71,
  115. "\u0048": 72,
  116. "\u0049": 73,
  117. "\u004A": 74,
  118. "\u004B": 75,
  119. "\u004C": 76,
  120. "\u004D": 77,
  121. "\u004E": 78,
  122. "\u004F": 79,
  123. "\u0050": 80,
  124. "\u0051": 81,
  125. "\u0052": 82,
  126. "\u0053": 83,
  127. "\u0054": 84,
  128. "\u0055": 85,
  129. "\u0056": 86,
  130. "\u0057": 87,
  131. "\u0058": 88,
  132. "\u0059": 89,
  133. "\u005A": 90,
  134. "\u005B": 91,
  135. "\u005C": 92,
  136. "\u005D": 93,
  137. "\u005E": 94,
  138. "\u005F": 95,
  139. "\u0060": 96,
  140. "\u0061": 97,
  141. "\u0062": 98,
  142. "\u0063": 99,
  143. "\u0064": 100,
  144. "\u0065": 101,
  145. "\u0066": 102,
  146. "\u0067": 103,
  147. "\u0068": 104,
  148. "\u0069": 105,
  149. "\u006A": 106,
  150. "\u006B": 107,
  151. "\u006C": 108,
  152. "\u006D": 109,
  153. "\u006E": 110,
  154. "\u006F": 111,
  155. "\u0070": 112,
  156. "\u0071": 113,
  157. "\u0072": 114,
  158. "\u0073": 115,
  159. "\u0074": 116,
  160. "\u0075": 117,
  161. "\u0076": 118,
  162. "\u0077": 119,
  163. "\u0078": 120,
  164. "\u0079": 121,
  165. "\u007A": 122,
  166. "\u007B": 123,
  167. "\u007C": 124,
  168. "\u007D": 125,
  169. "\u007E": 126,
  170. "\u2302": 127,
  171. "\u00C7": 128,
  172. "\u00FC": 129,
  173. "\u00E9": 130,
  174. "\u00E2": 131,
  175. "\u00E4": 132,
  176. "\u00E0": 133,
  177. "\u00E5": 134,
  178. "\u00E7": 135,
  179. "\u00EA": 136,
  180. "\u00EB": 137,
  181. "\u00E8": 138,
  182. "\u00EF": 139,
  183. "\u00EE": 140,
  184. "\u00EC": 141,
  185. "\u00C4": 142,
  186. "\u00C5": 143,
  187. "\u00C9": 144,
  188. "\u00E6": 145,
  189. "\u00C6": 146,
  190. "\u00F4": 147,
  191. "\u00F6": 148,
  192. "\u00F2": 149,
  193. "\u00FB": 150,
  194. "\u00F9": 151,
  195. "\u00FF": 152,
  196. "\u00D6": 153,
  197. "\u00DC": 154,
  198. "\u00A2": 155,
  199. "\u00A3": 156,
  200. "\u00A5": 157,
  201. "\u20A7": 158,
  202. "\u0192": 159,
  203. "\u00E1": 160,
  204. "\u00ED": 161,
  205. "\u00F3": 162,
  206. "\u00FA": 163,
  207. "\u00F1": 164,
  208. "\u00D1": 165,
  209. "\u00AA": 166,
  210. "\u00BA": 167,
  211. "\u00BF": 168,
  212. "\u2310": 169,
  213. "\u00AC": 170,
  214. "\u00BD": 171,
  215. "\u00BC": 172,
  216. "\u00A1": 173,
  217. "\u00AB": 174,
  218. "\u00BB": 175,
  219. "\u2591": 176,
  220. "\u2592": 177,
  221. "\u2593": 178,
  222. "\u2502": 179,
  223. "\u2524": 180,
  224. "\u2561": 181,
  225. "\u2562": 182,
  226. "\u2556": 183,
  227. "\u2555": 184,
  228. "\u2563": 185,
  229. "\u2551": 186,
  230. "\u2557": 187,
  231. "\u255D": 188,
  232. "\u255C": 189,
  233. "\u255B": 190,
  234. "\u2510": 191,
  235. "\u2514": 192,
  236. "\u2534": 193,
  237. "\u252C": 194,
  238. "\u251C": 195,
  239. "\u2500": 196,
  240. "\u253C": 197,
  241. "\u255E": 198,
  242. "\u255F": 199,
  243. "\u255A": 200,
  244. "\u2554": 201,
  245. "\u2569": 202,
  246. "\u2566": 203,
  247. "\u2560": 204,
  248. "\u2550": 205,
  249. "\u256C": 206,
  250. "\u2567": 207,
  251. "\u2568": 208,
  252. "\u2564": 209,
  253. "\u2565": 210,
  254. "\u2559": 211,
  255. "\u2558": 212,
  256. "\u2552": 213,
  257. "\u2553": 214,
  258. "\u256B": 215,
  259. "\u256A": 216,
  260. "\u2518": 217,
  261. "\u250C": 218,
  262. "\u2588": 219,
  263. "\u2584": 220,
  264. "\u258C": 221,
  265. "\u2590": 222,
  266. "\u2580": 223,
  267. "\u03B1": 224,
  268. "\u00DF": 225,
  269. "\u0393": 226,
  270. "\u03C0": 227,
  271. "\u03A3": 228,
  272. "\u03C3": 229,
  273. "\u00B5": 230,
  274. "\u03C4": 231,
  275. "\u03A6": 232,
  276. "\u0398": 233,
  277. "\u03A9": 234,
  278. "\u03B4": 235,
  279. "\u221E": 236,
  280. "\u03C6": 237,
  281. "\u03B5": 238,
  282. "\u2229": 239,
  283. "\u2261": 240,
  284. "\u00B1": 241,
  285. "\u2265": 242,
  286. "\u2264": 243,
  287. "\u2320": 244,
  288. "\u2321": 245,
  289. "\u00F7": 246,
  290. "\u2248": 247,
  291. "\u00B0": 248,
  292. "\u2219": 249,
  293. "\u00B7": 250,
  294. "\u221A": 251,
  295. "\u207F": 252,
  296. "\u00B2": 253,
  297. "\u25A0": 254,
  298. "\u00A0": 255
  299. }
  300.  
  301. if (typeof(module) != "undefined") {
  302. module.exports = asciiMapping
  303. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement