This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var validate = require('json-patch-joi'); | |
var Joi = require('joi'); | |
function clone(obj) { return JSON.parse(JSON.stringify(obj)); } | |
// original object to be patched | |
let obj = { nested: { stuff: true } }; | |
// patch that illegally modifies the stuff value | |
const patch = [{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="nav-bar.html"></require> | |
<require from="bootstrap/css/bootstrap.css"></require> | |
<nav-bar router.bind="router"></nav-bar> | |
<div class="page-host"> | |
<router-view></router-view> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="./group"></require> | |
<group group.two-way="groups"></group> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Simple generator (with co) VS async/await benchmark | |
// Article: https://medium.com/p/806d8375a01a | |
// | |
const co = require('co'); | |
const Benchmark = require('benchmark'); | |
const suite = new Benchmark.Suite; | |
// add tests |