I hereby claim:
- I am vdeturckheim on github.
- I am ecares (https://keybase.io/ecares) on keybase.
- I have a public key ASCYrvfvzp9hRv0VSx6JA_pAUKwnqVsiHgwUuRi-V-HMvQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
'use strict'; | |
const Code = require('code'); | |
const expect = Code.expect; | |
const Lab = require('lab'); | |
const lab = module.exports.exports.lab = Lab.script(); | |
const after = lab.after; | |
const before = lab.before; | |
const describe = lab.describe; | |
const it = lab.it; |
app.post('/posts', Celebrate.celebrate( | |
{ | |
body: Joi.object().keys({ | |
title: Joi.string().required(), | |
content: Joi.string().required() | |
}) | |
} | |
), | |
(req, res, next) => { |
'use strict'; | |
const Express = require('express'); | |
const BP = require('body-parser'); | |
const DB = require('./db.js'); | |
const app = Express(); | |
app.use(BP.json()); |
const DB_NAME = 'tests-express-sqlite'; | |
const Fs = require('fs'); | |
const Path = require('path'); | |
const Sqlite = require('sqlite3'); | |
try { | |
Fs.unlinkSync(`./${DB_NAME}`); | |
} | |
catch (_ign) {} |
CREATE TABLE POSTS( | |
ID INTEGER PRIMARY KEY AUTOINCREMENT, | |
TITLE TEXT NOT NULL, | |
CONTENT TEXT | |
); | |
INSERT INTO POSTS (TITLE, CONTENT) | |
VALUES ('hello world', 'hello'); | |
INSERT INTO POSTS (TITLE, CONTENT) |
function exec(arg) { | |
switch (arg) { | |
case 1: break; | |
case 2: break; | |
... | |
case 128: break; | |
case 129: break; | |
} | |
} |
function exec(arg) { | |
switch (arg) { | |
case 1: break; | |
case 2: break; | |
case 3: break; | |
case 4: break; | |
case 5: break; | |
case 6: break; | |
case 7: break; | |
case 8: break; |
function exec() { | |
var arr = [1, 2]; | |
for (var key in arr) {} | |
} |
function exec() { | |
with ({}) {} | |
} |