DEV Community

Zack
Zack

Posted on

11 9

NEW NODE PACKAGE

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

SurveyJS custom survey software

Simplify data collection in your JS app with a fully integrated form management platform. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more. Integrates with any backend system, giving you full control over your data and no user limits.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more