New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

verb-uri

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

verb-uri

A verb URI parse and stringify Node.js module

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

verb-uri

Build Status

A verb URI parse and stringify Node.js module

Install

npm install verb-uri

Example

example/index.js


const verbURI = require('verb-uri');

console.log(verbURI.parse('POST /api/book')); // { verb: 'POST', uri: '/api/book' }
console.log(verbURI.parse('/api/books')); // { verb: 'GET', uri: '/api/books' }
console.log(verbURI.parse('/api/books', { defaultVerb: 'POST' })); // { verb: 'POST', uri: '/api/books' }

console.log(verbURI.stringify('post', '/api/book')); // 'POST /api/book'
console.log(verbURI.stringify('post', '/api/book', { keepCase: true })); // 'post /api/book'
console.log(verbURI.stringify(null, '/api/books')); // 'GET /api/book'

Author

Liu Yue

License

GPL-3.0

Keywords

http

FAQs

Package last updated on 07 May 2018

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