1.0.4 • Published 3 years ago

ophiomormous v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Ophiomormous

A collection of useful Python functions ported to JavaScript

Functions

all

Returns true if all values are true

import { all } from 'ophiomormous'

all([1, true, 0, false])

any

Returns true if only one value is true

import { any } from 'ophiomormous'

any([1, true, 0, false])

divmod

Returns the quotient and remainder in a list

import { divmod } from 'ophiomormous'

divmod(36, 7)

enumerate

Returns a list of object with the character as the value and its index as the key

import { enumerate } from 'ophiomormous'

enumerate("Hello")

max

Returns the largest number

import { max } from 'ophiomormous'

max([9, 89, 8, 3, 0])

min

Returns the smallest number

import { min } from 'ophiomormous'

min([9, 89, 8, 3, 0])

range

Returns a list of numbers through a specified range and step

import { range } from 'ophiomormous'

range(7, 39, 8)

sum

Returns the sum of all values

import { sum } from 'ophiomormous'

sum([9, 7, 3, 22, 4])