This file contains hidden or 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
| #r "Newtonsoft.Json" | |
| using System.Net; | |
| using System.Linq; | |
| using Microsoft.AspNetCore.Mvc; | |
| using Microsoft.Extensions.Primitives; | |
| using Newtonsoft.Json; | |
| public class FacebookPost | |
| { |
This file contains hidden or 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
| export default class Log { | |
| private prefix: string; | |
| private logSource: object; | |
| private parseArgument(arg: any): string { | |
| return typeof(arg) === "string" ? arg : JSON.stringify(arg); | |
| } | |
| private getMethodName(callingFunction: Function): string { | |
| const methodNames = Object.getOwnPropertyNames(Object.getPrototypeOf(this.logSource)); |
This file contains hidden or 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
| (async function() { | |
| let userIds = [239, 405]; | |
| // computed property name: [prop]: | |
| // rest parameters: ...props | |
| // stolen from: https://stackoverflow.com/a/25554551 | |
| function pick(o, ...props) { | |
| return Object.assign({}, ...props.map(prop => ({[prop]: o[prop]}))); | |
| } |