Create an anonymous gist
$ npm install create-gist
const createGist = require('create-gist');
const url = await createGist({
description: 'My lovely gist',
public: false,
files: [
{
name: 'test.js',
source: 't.is(a, b)'
}
]
});
//=> https://gist.github.com/40cd13c18a51ca98c7eebd4cb79c8f95
Returns: Promise
Type: string
Description of the gist.
Type: boolean
Default: true
Create a public or private gist.
Type: array
Array of objects with name (filename) and source (source of the file) props.
MIT © Vadim Demedes