Socket
Book a DemoInstallSign in
Socket

@advertima/snapshot

Package Overview
Dependencies
Maintainers
5
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@advertima/snapshot

[![Build Status](https://travis-ci.org/advertima/snapshot.svg?branch=development)](https://travis-ci.org/advertima/snapshot) [![npm version](https://badge.fury.io/js/%40advertima%2Fsnapshot.svg)](https://badge.fury.io/js/%40advertima%2Fsnapshot) [![codeco

5.1.0
latest
npmnpm
Version published
Weekly downloads
17
750%
Maintainers
5
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 29 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.