avoidwork / tiny-parse

URL parsing with coercion

Home Page:http://avoidwork.github.io/tiny-parse/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tiny-parse

build status

URL parsing with coercion of query

Example

"use strict";

const parse = require("tiny-parse");

console.log(parse("http://localhost/?abc=true").query.abc === true); // true
console.log(parse("http://localhost/?abc=true", false).query.abc === true); // false

API

parse(arg, coerce=true) Parses the input, accepts a URL or http.ClientRequest

License

Copyright (c) 2018 Jason Mulligan Licensed under the BSD-3 license.

About

URL parsing with coercion

http://avoidwork.github.io/tiny-parse/

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:JavaScript 100.0%