@matrixoc/snippet

1.1.70 • Public • Published

Snippet

Build Status CircleCI

Snippet is a library of code snippets/examples. It's made to show people examples of code that can easily be executed and used.

Installation

Install Snippet with Yarn or NPM:

yarn add @matrixoc/snippet
npm install @matrixoc/snippet

Contributing

See CONTRIBUTING.md.

API

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');

Contributing

You may add a Snippet and it will be reviewed within the next 48 hours.

Contributors

The following is a list of all contributors(a-z);

Dependents (0)

Package Sidebar

Install

npm i @matrixoc/snippet

Weekly Downloads

0

Version

1.1.70

License

none

Unpacked Size

154 kB

Total Files

55

Last publish

Collaborators

  • faztasio