<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [get][1]
-   [each][2]

## get

Get a fixture by name

**Parameters**

-   `id` **([String][3] \| [Number][4])** the id of the fixture as specified in [FIXTURES.md][5]

**Examples**

```javascript
const mvtf = require('mvt-fixtures');

const fixture = mvtf.get('001');
console.log(fixture.id); // => '001'
console.log(fixture.description); // => ...
console.log(fixture.specification_reference); // => url to Mapbox Vector Tile specification reference
console.log(fixture.buffer); // => Buffer object
console.log(fixture.json); // => json representation of the fixture
```

Returns **[Object][6]** fixture - a fixture object

## each

Loops through all fixtures and provides the fixture object from get()

**Parameters**

-   `fn`  
-   `function` **[Function][7]** a synchronously running function to execute on each fixture

**Examples**

```javascript
const mvtf = require('mvt-fixtures');
const assert = require('assert');

mvtf.each(function(fixture) {
  assert.ok(Buffer.isBuffer(fixture.buffer), 'is a buffer');
});
```

[1]: #get

[2]: #each

[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

[5]: FIXTURES.md

[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
