Hello, all!
My name is Zack, I am a developer that has been working on this package since it started. (I created it!)
It's a source for a whole bunch of code "snippets" that are free to use anywhere, anytime. Snippet
is supposed to be as crowd-sourced as possible, so contribute your code snippets at our Github:
Github Link
It has an easy to use API that allows instant access to any snippet.
Usage
There is a few functions that package up some helpful methods for use with Snippet.
/* Load up the Node module */
const snippet = require('@matrixoc/snippet');
Get All Snippets
snippet.getSnippets();
Get All Snippets for a Certain Language
snippet.getSnippetsByLanguage('javascript');
Get a Snippet By Name
snippet.getSnippetByName('hello_world_js');
Check If a Snippet Exists
snippet.checkName('hello_world_js');
Check If a Language Has Any Snippets
snippet.checkLanguage('javascript');
Installation
You can download from NPM, Yarn or RubyGems.
npm i @matrixoc/snippet
yarn add @matrixoc/snippet
gem install snippetpkg
Top comments (0)