5.1.0 • Published 3 years ago

@advertima/snapshot v5.1.0

Weekly downloads
80
License
-
Repository
-
Last release
3 years ago

snapshot

Build Status npm version codecov Minfied size Minified + gzip size

POISnapshot models Javascript utilities to decode to a POISnapshot

Installation

$ npm install @advertima/snapshot --save

The @advertima/snapshot type definitions are included in the npm package.

Basics

import { POISnapshot } from '@advertima/snapshot';

// Decode binary snapshot
const snapshot = POISnapshot.decode(someBinaryData);

Test Utils

We provide you an easy way to create a POISnapshot instance of a PersonDetection instance for your tests.

import {
  PersonDetectionGenerator,
  POISnapshotGenerator,
  ContentMessageGenerator,
} from '@advertima/snapshot';

const person = PersonDetectionGenerator.generate({ age: 27, gender: 'male', y: 1.4 });

const params1 = { age: 27, gender: 'female', name: 'toto' };
const params2 = { age: 28, gender: 'male', name: 'titi' };
const snapshot = POISnapshotGenerator.generate([params1, params2]);

const contentMessage = ContentMessageGenerator.generate({
  localTimestamp: 1537362300000,
  contentId: '1',
  name: 'start',
  personPutIds: [],
  poi: 1,
});

License

@advertima/snapshot is MIT licensed.

5.1.0

3 years ago

5.0.4

3 years ago

5.0.3

3 years ago

5.0.2

3 years ago

5.0.1

3 years ago

5.0.0

3 years ago

4.0.3

4 years ago

4.0.2

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.1.0

4 years ago

3.0.0

4 years ago

2.0.0

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago