jsmp-infra-art-test-publish

1.0.2 • Public • Published

JSMP INFRA TEST

Description

It is just a package created for test purposes.

Install

Browser

<script src='path/to/jsmp-infra-art-test-publish'></script>

NPM

npm install --save jsmp-infra-art-test-publish

Usage

Require

Function that accepts array and number multiply elements of this array by this number and returns modified array

const { multiplyArray } = require('jsmp-infra-art-test-publish');
 
multiplyArray([1, 2, 3], 3); 
// => [3, 6, 9]
 
multiplyArray([1, 'a', 2, 'b', 3], 3); 
// => [3, 6, 9], all non-numeric elements were removed
 
multiplyArray([1, 2, 3]);
 // => [2, 4, 6], default multiplier is 2

Function that accept string and returns greeting

const { greeting } =  require('jsmp-infra-art-test-publish');
 
greeting('Mike'); // => 'Hello, Mike!'
greeting(); // => 'Hello, Artem!' => 'Artem' is a default value
greeting(123); // => 'Hello, Artem!' => 'Artem' is a default value

ES6 import

Function that accepts array and number multiply elements of this array by this number and returns modified array

import { multiplyArray } from 'jsmp-infra-art-test-publish';
 
multiplyArray([1, 2, 3], 3); 
// => [3, 6, 9]
 
multiplyArray([1, 'a', 2, 'b', 3], 3); 
// => [3, 6, 9], all non-numeric elements were removed
 
multiplyArray([1, 2, 3]);
 // => [2, 4, 6], default multiplier is 2

Function that accept string and returns greeting

import { greeting } from 'jsmp-infra-art-test-publish';
 
greeting('Mike'); // => 'Hello, Mike!'
greeting(); // => 'Hello, Artem!' => 'Artem' is a default value
greeting(123); // => 'Hello, Artem!' => 'Artem' is a default value

Readme

Keywords

Package Sidebar

Install

npm i jsmp-infra-art-test-publish

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

99.2 kB

Total Files

10

Last publish

Collaborators

  • art_chetya