bench/rules.js
function getTiles(name) {
  let tiles = [];
  let dir = `./node_modules/@mapbox/mvt-fixtures/real-world/${name}`;
  var files = fs.readdirSync(dir);
  files.forEach(function(file) {
    let buffer = fs.readFileSync(path.join(dir, '/', file));
    file = file.replace('.mvt', '');
    let zxy = file.split('-');
    tiles.push({ buffer: buffer, z: parseInt(zxy[0]), x: parseInt(zxy[1]), y: parseInt(zxy[2]) });
  });
  return tiles;
}
function getTiles(name) {
  let tiles = [];
  let dir = `./node_modules/@mapbox/mvt-fixtures/real-world/${name}`;
  var files = fs.readdirSync(dir);
  files.forEach(function(file) {
    let buffer = fs.readFileSync(path.join(dir, '/', file));
    file = file.replace('.mvt', '');
    let zxy = file.split('-');
    tiles.push({ buffer: buffer, z: parseInt(zxy[0]), x: parseInt(zxy[1]), y: parseInt(zxy[2]) });
  });
  return tiles;
}
function getTiles ( name ) { let tiles = [ ] ; let dir = ` ${ name } ` ; var files = fs . readdirSync ( dir ) ; files . forEach ( function ( file ) { let buffer = fs . readFileSync ( path . join ( dir , '/' , file ) ) ; file = file . replace ( '.mvt' , '' ) ; let zxy = file . split ( '-' ) ; tiles . push ( { buffer : buffer , z : parseInt ( zxy [ 0 ] ) , x : parseInt ( zxy [ 1 ] ) , y : parseInt ( zxy [ 2 ] ) } ) ; } ) ; return tiles ; }
get all tiles
get all tiles