strings-parser-url

Parser for strings to handle url parsing.

1 个版本
安装
npm install strings-parser-url
yarn add strings-parser-url
pnpm add strings-parser-url
bun add strings-parser-url
README

strings-parser-url NPM version

Parser for strings to handle url parsing.

Install

Install with npm:

npm i strings-parser-url --save

Usage

Add as a strings parser:

var Strings = require('strings');
var url = require('strings-parser-url');

var strings = new Strings();
strings.parser('url', url());

var context = {
  url: 'https://github.com/assemble/strings.git?sortby=name'
};
var template = ':protocol';
var dest = strings.template(template, 'url', context);

// expected: 'https:'
console.log(dest);

Author

Brian Woodward

License

Copyright (c) 2014 Brian Woodward, contributors.
Released under the MIT license


This file was generated by verb-cli on May 15, 2014.

版本列表
0.1.0 2014-05-16