jsmp-infra-miller
v1.1.1
Published
This package is for education purposes
Downloads
1
Maintainers
Readme
npm
npm install jsmp-infra-miller
Functions:
textEncrypt
Function encrypts the text:
- The first letter needs to be converted to its ASCII code.
- The second letter needs to be switched with the last letter
Api
import { textEncrypt } from 'jsmp-infra-miller';
or
const { textEncrypt } = require('jsmp-infra-miller');
textEncrypt('any string you want to encrypt')// => 97yn 115grint 121uo 119tna 116o 101tcrypn
arrayAverage
The function takes an array of data and returns the arithmetic mean of the numeric values in the array
Valid values:
- numbers of type number and numbers of type string;
- Other values will be ignored.
Api
import { arrayAverage } from 'jsmp-infra-miller';
or
const {arrayAverage} = require('jsmp-infra-miller');
arrayAverage([1,2,[],'3',{},NaN, true])// => 2; arrayAverage(1,2,[],'3',{},NaN, true)// => 2