Skip to content

Instantly share code, notes, and snippets.

@RienNeVaPlus
RienNeVaPlus / getAllPropertyNames.ts
Created April 30, 2020 03:14
getAllPropertyNames(obj) collects property names of the entire prototype chain until it reaches `Object` by using `Object.getOwnPropertyNames()`
/**
* Similar to Object.getOwnPropertyNames(obj) but including the properties of the entire prototype chain
* @param obj
* @param maxChainLength
*/
export function getAllPropertyNames(
obj: { new(): any },
maxChainLength: number = 10
): string[] {
let set: Set<string> = new Set(), i: number = 0;
@justincbagley
justincbagley / How_to_Convert_Markdown_to_PDF.md
Last active April 28, 2024 22:28
How To Convert Markdown to PDF

How to convert markdown to PDF:

This post reviews several methods for converting a Markdown (.md) formatted file to PDF, from UNIX or Linux machines.

Using Pandoc:

$ pandoc How_I_got_svg-resizer_working_on_Mac_OSX.md -s -o test1.pdf