"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/npm/lib/xmas.js" (7 Feb 2017, 1609 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 // happy xmas
    2 var log = require('npmlog')
    3 
    4 module.exports = function (args, cb) {
    5   var s = process.platform === 'win32' ? ' *' : ' \u2605'
    6   var f = '\uFF0F'
    7   var b = '\uFF3C'
    8   var x = process.platform === 'win32' ? ' ' : ''
    9   var o = [
   10     '\u0069', '\u0020', '\u0020', '\u0020', '\u0020', '\u0020',
   11     '\u0020', '\u0020', '\u0020', '\u0020', '\u0020', '\u0020',
   12     '\u0020', '\u2E1B', '\u2042', '\u2E2E', '&', '@', '\uFF61'
   13   ]
   14   var oc = [21, 33, 34, 35, 36, 37]
   15   var l = '\u005e'
   16 
   17   function w (s) { process.stderr.write(s) }
   18 
   19   w('\n')
   20   ;(function T (H) {
   21     for (var i = 0; i < H; i++) w(' ')
   22     w(x + '\u001b[33m' + s + '\n')
   23     var M = H * 2 - 1
   24     for (var L = 1; L <= H; L++) {
   25       var O = L * 2 - 2
   26       var S = (M - O) / 2
   27       for (i = 0; i < S; i++) w(' ')
   28       w(x + '\u001b[32m' + f)
   29       for (i = 0; i < O; i++) {
   30         w(
   31           '\u001b[' + oc[Math.floor(Math.random() * oc.length)] + 'm' +
   32           o[Math.floor(Math.random() * o.length)]
   33         )
   34       }
   35       w(x + '\u001b[32m' + b + '\n')
   36     }
   37     w(' ')
   38     for (i = 1; i < H; i++) w('\u001b[32m' + l)
   39     w('| ' + x + ' |')
   40     for (i = 1; i < H; i++) w('\u001b[32m' + l)
   41     if (H > 10) {
   42       w('\n ')
   43       for (i = 1; i < H; i++) w(' ')
   44       w('| ' + x + ' |')
   45       for (i = 1; i < H; i++) w(' ')
   46     }
   47   })(20)
   48   w('\n\n')
   49   log.heading = ''
   50   log.addLevel('npm', 100000, log.headingStyle)
   51   log.npm('loves you', 'Happy Xmas, Noders!')
   52   cb()
   53 }
   54 var dg = false
   55 Object.defineProperty(module.exports, 'usage', {get: function () {
   56   if (dg) module.exports([], function () {})
   57   dg = true
   58   return ' '
   59 }})