🌌 Nikola Snippets 🌌
Supported languages (file extensions)
- JavaScript (.js)
- JavaScript React (.jsx)
- TypeScript (.ts)
- TypeScript React (.tsx)
- CSS (.css)
- MarkDown (.md)
Javascript / Typescript
Prefix |
Method |
imp→ |
import moduleName from 'module'; |
imd→ |
import { destructuredModule } from 'module'; |
req→ |
const moduleName = require('module'); |
reqd→ |
const { moduleName } = require('module'); |
ed→ |
export default moduleName ; |
me→ |
module.exports = { moduleName }; |
cl→ |
console.log('', ); |
ce→ |
console.error(''); |
fn→ |
const functionName = (params) => |
afn→ |
const functionName = async (params) => |
c→ |
const name = value; |
l→ |
let name = value; |
obj→ |
const name = { value }; |
arr→ |
const name = [ value, ]; |
des→ |
const {name} = value; |
desa→ |
const [name] = value; |
ut→ |
export const nameFunction = () => |
React ⚛️
Prefix |
Method |
imr→ |
import React from react'; |
imrd→ |
import react-DOM from react-dom'; |
fm→ |
<> fragment </> |
MarkDown
Prefix |
Method |
c→ |
```language $0 ``` |
a→ |
[text][http://] |
img→ |
[alt][http://] |
table→ |
One table 2 x 2 |
CSS
Prefix |
Method |
var→ |
var(--name); |
dvar→ |
--name: value; |
rgb→ |
rgb(red, green, blue); |
rgb→ |
rgba(red, green, blue, alpha); |
hsl→ |
hsl(hue, saturation, lightness); |
hsl→ |
hsl(hue, saturation, lightness, alpha); |
Javascript / Typescript View
cl
console.log('');
ce
console.error(|);
imp
import moduleName from 'module';
imd
import { moduleName } from 'module';
req
const moduleName = require('module');
reqd
const { moduleName } = require('module');
fn
const nameFunction = (params) => |
afn
const nameFunction = async (params) => |
c
const name = value;
l
let name = value;
obj
const name = {
value,
};
arr
const name = [value];
des
const { value } = name;
desa
const [value] = name;
ed
export default $TM_FILENAME_BASE;
me
module.exports = ${ $TM_FILENAME_BASE };
Testing
desc
describe('$1', () => {
$0,
});
test
test('should $1', () => {
$0,
});
testa
test('should $1', async () => {
$0,
});
it
it('should $1', () => {
$0,
})
ita
it('should $1', async () => {
$0,
})
ut
export const $TM_FILENAME_BASE = () => {
$0;
};
React ⚛️ View
imr
import React from 'react';
imrd
import React-DOM from 'react-dom';
fm
<>
$0
</>
rfc
import React from 'react';
const $TM_FILENAME_BASE = () => {
return (
<>
<h1>$TM_FILENAME_BASE</h1>
$0
</>
);
};
export default $TM_FILENAME_BASE;
MarkDown View
c
```language
$0
```
a
[text](http://)
img
![alt](http://)
CSS View
var
var(--name);
dvar
--name: value;"
rgb
rgb(red, green, blue);
rgba
rgba(red, green, blue, alpha);
hsl
hsl(hue, saturation, lightness);"
hsla
hsla(hue, saturation, lightness, alpha);
🇪🇦 Añade un pr si quieres que agrege tu snippet favorito
🇬🇧 Add one pr if you want me to add your favorite snippet