This file contains hidden or 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 Cutter = require('cutter'); | |
var net = require('net'); | |
/** | |
* must return length of head + body | |
*/ | |
function packetLength(data) { | |
return 4 + data.readInt32BE(0); | |
} | |
var cutter = new Cutter(4, packetLength); |
This file contains hidden or 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 check = require('./'); | |
var rule = { | |
name: 'string', | |
age: {type: 'int', max: 200}, | |
gender: ['male', 'female'], | |
working: 'boolean', | |
salary: {type: 'number', min: 0}, | |
birthday: 'date', | |
now: 'dateTime', |
This file contains hidden or 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 createGame = require('voxel-engine'); | |
var game = module.exports = createGame({ | |
generateChunks: false, | |
texturePath: 'textures/', | |
materials: [ | |
['grass', 'dirt', 'grass_dirt'], 'brick', 'cobblestone', 'bluewool', 'glowstone', 'diamond', 'grass_dirt', 'grass' | |
// ,'meow' | |
], | |
//materialFlatColor: true, |
This file contains hidden or 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
'use strict'; | |
const Benchmark = require('benchmark'); | |
const benchmarks = require('beautify-benchmark'); | |
const suite = new Benchmark.Suite(); | |
suite | |
.add('Object.assign', function() { |
OlderNewer