GT2/GT2-Android/node_modules/@segment/loosely-validate-event
Ren Ren Juan c5fd23b54f Get new tree with state verified with current React Native on both platforms 2018-02-12 17:11:06 +00:00
..
.npmignore Get new tree with state verified with current React Native on both platforms 2018-02-12 17:11:06 +00:00
HISTORY.md Get new tree with state verified with current React Native on both platforms 2018-02-12 17:11:06 +00:00
README.md Get new tree with state verified with current React Native on both platforms 2018-02-12 17:11:06 +00:00
circle.yml Get new tree with state verified with current React Native on both platforms 2018-02-12 17:11:06 +00:00
index.js Get new tree with state verified with current React Native on both platforms 2018-02-12 17:11:06 +00:00
package.json Get new tree with state verified with current React Native on both platforms 2018-02-12 17:11:06 +00:00
test.js Get new tree with state verified with current React Native on both platforms 2018-02-12 17:11:06 +00:00
yarn.lock Get new tree with state verified with current React Native on both platforms 2018-02-12 17:11: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