Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

localz-driver-uri-generator

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

localz-driver-uri-generator

Handles object validation, base64 encoding, and query stringifying.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Localz Driver URI Generator

Handles object validation, base64 encoding, and query stringifying.

Types

Notify

For notifying customers of a driver's approach.

type - 'notify'

data schema - shown using Joi object syntax

Joi.object().keys({
  user: Joi.object().required().keys({
    id: Joi.string().required(),
    password: Joi.string(),
    firstname: Joi.string(),
    lastname: Joi.string(),
    mobile: Joi.string()
  }),
  job: Joi.object().required().keys({
    id: Joi.string().required(),
    start: Joi.string().isoDate(),
    end: Joi.string().isoDate()
  }),
  contact: Joi.object().required().keys({
    address: Joi.string().required(),
    postcode: Joi.string().required(),
    name: Joi.string(),
    phone: Joi.string()
  })
})

Usage

Specify the type of URI, the correct data object, and optionally a callback.

import generateURI from 'localz-driver-uri-generator'

const uri = generateURI('notify', data, 'someapp://')

FAQs

Package last updated on 15 Nov 2017

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc