My First Playground

node v14.18.1
version: 1.0.0
This is a playground to test JavaScript. It runs a completely standard copy of Node.js on a virtual server created just for you. Every one of npm’s 300,000+ packages are pre-installed, so try it out:
// BASE var astrologyjs = require("astrologyjs"); var consoleLogJson = require("console-log-json"); // Node.js style let Person = require("astrologyjs").Person; let Chart = require("astrologyjs").Chart; let ChartFactory = require("astrologyjs").ChartFactory; let ChartType = require("astrologyjs").ChartType; // Using async/await let person; try { person_a = await Person.create("Pal", "1981-08-15T14:35Z", {lat: 47.49835, lng: 19.04045}); person_b = await Person.create("Dori", "1992-03-20T04:30Z", {lat: 47.39489, lng: 18.91361}); } catch (err) { // uh-oh... } // Using async/await let chart; try { //chart_a = await ChartFactory.create("Pál chart", person_a); //chart_b = await ChartFactory.create("Dóri chart", person_b); snsty = await ChartFactory.create("Pal and Dora Synastry", person_a, person_b, ChartType.Synastry); } catch (err) { // uh-oh... (probably means web service was unavailable for some reason) }

no comments

    sign in to comment