Here's how you could create custom error classes in Node.js using latest ES6 / ES2015 syntax.
I've tried to make it as lean and unobtrusive as possible.
errors/AppError.js
| /* http://meyerweb.com/eric/tools/css/reset/ | |
| v2.0 | 20110126 | |
| License: none (public domain) | |
| */ | |
| html, body, div, span, applet, object, iframe, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
| a, abbr, acronym, address, big, cite, code, | |
| del, dfn, em, img, ins, kbd, q, s, samp, | |
| small, strike, strong, sub, sup, tt, var, |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Simple Modal</title> | |
| <!-- <link rel="stylesheet" href="style.css" /> --> | |
| <style> |
| var crypto = require("crypto") | |
| function encrypt(key, data) { | |
| var cipher = crypto.createCipher('aes-256-cbc', key); | |
| var crypted = cipher.update(text, 'utf-8', 'hex'); | |
| crypted += cipher.final('hex'); | |
| return crypted; | |
| } |
| //React.js#5.State và Lifecycle-vòng đời của một React component | |
| import React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| class Counter extends React.Component { | |
| constructor(props){ | |
| super(props) | |
| this.state = {seconds: 10} | |
| } |
| {"lastUpload":"2021-07-18T13:32:11.948Z","extensionVersion":"v3.4.3"} |
As configured in my dotfiles.
start new:
tmux
start new with session name: