SHARE
TWEET

Untitled

a guest Aug 25th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * qjsc -fno-eval -m -o ohai ohai.js
  3.  */
  4. "use strict";
  5. "use math";
  6.  
  7. import * as std from "std"
  8. import * as os from "os"
  9.  
  10. // dl'd from gh for local use
  11. import { Decimal } from "./decimal.mjs"
  12.  
  13. function ohyeah (something = "OH YEAH!") {
  14.   return new Promise((resolve, reject) => {
  15.     resolve(something)
  16.   })
  17. }
  18.  
  19. (async function () {
  20.  
  21.   console.log('1 ::-----')
  22.   console.log('args: ', Array.from(scriptArgs).slice(1))
  23.  
  24.   console.log('2 ::-----')
  25.   console.log(std.getenv('PWD'))
  26.  
  27.   console.log('3 ::-----')
  28.   std.out.puts(await ohyeah("*crashes through wall* OH YEAH!"))
  29.   std.out.puts('\n')
  30.  
  31.   console.log('4 ::-----')
  32.   console.log('platform: ', os.platform)
  33.  
  34.   console.log('5 ::----- 🤡')
  35.   console.log('0.3 - 0.1 = ', (0.3 - 0.1))
  36.   console.log('0.3 - 0.1 = ', Decimal.sub('0.3', '0.1'))
  37.  
  38.   console.log('X ::-----')
  39.   std.exit(0)
  40. })()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top