1.0.3 • Published 3 years ago

jsmp-infra-skakun v1.0.3

Weekly downloads
5
License
ISC
Repository
-
Last release
3 years ago

SJMP-INFRA-SKAKUN

This package contains two functions for working with strings (changeStringRegister) and arrays (excludeFromArray).

  • changeStringRegister has ability to change register of passed string;
  • excludeFromArray has ability to exclude set of values from specified array;

INSTALLATION

npm i jsmp-infra-skakun

USAGE

First of all, import necessary function from the package:

const { changeStringRegister } = require('jsmp-infra-skakun');
    or
import { changeStringRegister } from 'jsmp-infra-skakun';

Expected arguments:

changeStringRegister(string, mode)

string type: string - string that would be modified

mode type: string - mode for string transformation. Three modes are available:

  • cap - capitalize
  • upper - transform to uppercase
  • lower - transform to lower case
const { excludeFromArray } = require('jsmp-infra-skakun');
    or
import { excludeFromArray } from 'jsmp-infra-skakun';
excludeFromArray(array, values)

array type: array - array that would be modified

values type: array - array of the values that will be excluded from the original array

EXAMPLES

Then just use imported functions in your code with appropriate arguments:

changeStringRegister('tEST STRING', 'cap') // 'Test string'
excludeFromArray([1, 2, 3, 4, 5], [1, 2, 3]) // [4, 5]
1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago