This file contains 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
const { ValueViewerSymbol } = require("@runkit/value-viewer"); | |
const myCustomObject = { | |
[ValueViewerSymbol]: { | |
title: "My First Viewer1", | |
HTML: "<marquee>🙏 Welcome to Angular-Gist-RunkKit demo. 🙋 Hi my name is Kedar Paritkar, and i am currently working on <a href='https://angularpoc.com/'>Angular-way</a></marquee>" | |
} | |
}; |
This file contains 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
require("request"); | |
async function currentPosition() { | |
return JSON.parse(await require("request-promise")("http://api.open-notify.org/iss-now.json")).iss_position; | |
}; | |
await currentPosition(); |
This file contains 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
var _ = require("lodash@4.17.10") | |
_.assign(global, require("lodash-doc-globals")) | |
Object.observe = _.noop | |
_.forEach([1, 2], function(value) { | |
console.log(value); | |
}); |
This file contains 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
var R = require("ramda"); | |
var randrange = require("random-number-in-range"); | |
var count = 100; | |
var nodes = R.range(0, 100).map((_, x) => ({ "name": x, "group": Math.floor(x * 7 / count) })); | |
var links = R.range(0, Math.floor(count * 1.15)).map(function(_, x) | |
{ | |
var source = x % count; | |
var target = Math.floor(Math.log(1 + randrange(0, count)) / Math.log(1.3)); |
This file contains 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
/** | |
* Reconfigures current test suit to prevent angular components compilation after every test run. | |
* Forces angular test bed to re-create zone and all injectable services by directly | |
* changing _instantiated to false after every test run. | |
* Cleanups all the changes and reverts test bed configuration after suite is finished. | |
* reference : https://blog.angularindepth.com/angular-unit-testing-performance-34363b7345ba | |
*/ | |
import { getTestBed, TestBed, ComponentFixture } from '@angular/core/testing'; | |
import { } from 'jasmine'; |