GT2/GT2-iOS/node_modules/@segment/loosely-validate-event
Ren Ren Juan 30eef7d036 correct tree err 2018-02-12 17:26:06 +00:00
..
.npmignore correct tree err 2018-02-12 17:26:06 +00:00
HISTORY.md correct tree err 2018-02-12 17:26:06 +00:00
README.md correct tree err 2018-02-12 17:26:06 +00:00
circle.yml correct tree err 2018-02-12 17:26:06 +00:00
index.js correct tree err 2018-02-12 17:26:06 +00:00
package.json correct tree err 2018-02-12 17:26:06 +00:00
test.js correct tree err 2018-02-12 17:26:06 +00:00
yarn.lock correct tree err 2018-02-12 17:26:06 +00:00

README.md

@segment/loosely-validate-event

Loosely validate an event.

Example

const validate = require('@segment/loosely-validate-event')

const event = {
  type: 'track',
  userId: 'abc123',
  properties: {
    foo: 'bar'
  }
}

validate(event) // throws if `event` does not pass validation