Skip to content

buxlabs/pure-conditions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pure-conditions

npm build

A set of pure functions.

Table of Contents

Background

The library is a set of functions that can make developement easier by handling the most popular condition statements. Functions are pure, which means that they do not have side effects and have predictible output. The functions are isolated and do not depend on each other which makes it easier for bundlers and compilers to consume them.

Install

npm install pure-conditions

Usage

const { hasDuplicates } = require('pure-conditions')
hasDuplicates(['foo', 'foo']) // true
const { isEmpty } = require('pure-conditions')
isEmpty({ foo: 'bar' }) // false
const { endsWith } = require('pure-conditions')
endsWith('foo bar', 'bar') // true
const { isEmail } = require('pure-conditions')
isEmail('foobar@gmail.com') // true

Maintainers

@emilos

Contributing

Pull requests and issues are always welcome.

License

MIT

Releases

No releases published

Packages

No packages published