Skip to content

pfryga/bi-decorator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bi-params-decorator

Requirements

Node.js v8.0.0 or greater

Use

Installation

npm i bi-params-decorator --save

Init object and decorate url with parameters

import BiDecorator from 'bi-decorator';

const biDecorator = new BiDecorator({
    bi_s: 'internal',
    bi_c: 111,
    bi_m: 'automotive_txt',
    bi_term: 'some_tags'
});

const url = 'http://allegro.pl/dzial/motoryzacja';
const resultUrl = biDecorator.decorateWithTags(url);
// resultUrl equals 'http://allegro.pl/dzial/motoryzacja?bi_s=internal&bi_c=123&bi_m=automotive_txt'

Run unit tests

npm run test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published