0.0.10 • Published 7 years ago

jsnip v0.0.10

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

jsnip Build Status

Get common JavaScript code snippets.

:hamburger: This is my WIP snippet library where you can get customizable JS code snippets from within your node applications.

Note: The React snippets are currently in a React Native flavor and the JavaScript is intended to reflect the ES2015 (ES6) syntax.

If you want to get snippets from the command line, check out jsnip-cli.

Install

$ npm install --save jsnip

Usage

const jsnip = require('jsnip');
jsnip('reducer', { name: 'MyAwesomeClass' });

API

jsnip(input, options)

input

Type: string

The name of the code snippet you want to print. Click the link to see the actual snippet file.

inputDescription
functionA functional React component.
classA class-based React component.
actionA Redux action snippet.
reducerA Redux reducer snippet.
lorem3 paragraphs of lorem ipsum text.
reduxclassA connected (Redux) React class-based component.

options

Type: object

Possible options are:

TypeDefaultDescription
namestring'ClassName'Specify the function or class name to use in the output

Contribution

Currently this module is for my own productivity, so I won't be accepting Pull Requests that try to impose specific styles or opinions. However I will accept Pull Requests that aim to populate the snippet library with useful goodies. :hamburger:

Related

  • jsnip-cli Get these snippets from the command line; Optionally copy to the clipboard.

License

MIT © Michael Wuergler

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago