node package manager

isnovid.a

0.2.1

isnovid.a

0.2.1

All methods take a lot of arguments. Each type is matched, depending on the function.

a.number 171991 # true 
a.string "isnovid""a""coffeescript""javascript" # true 

Many methods have aliases, made for beauty.

a.string "isnovid" # true 
a.strings "a""coffeescript""javascript" # true 

Install

Each version is published in the NPM repository.

npm install isnovid.a

git clone git://github.com/isnovid/isnovid.a.git

Interface

Server: A = require "isnovid.a"

Client: A = isnovid.A

a = new A

Does not accept arguments.

In the future it will be possible to accept the configuration.

Type checkers

a.null arguments...

a.null``a.nulls

a.nulls nullnullnull # true 
a.null 0 # false 

a.undefined arguments...

a.undefined``a.undefineds

a.undefineds undefinedundefinedundefined # true 

a.boolean arguments...

a.boolean``a.booleans

a.booleans truefalsetrue # true 

a.number arguments...

a.number``a.numbers

a.numbers 171991 # true 
a.number NaN # false 
a.number null # false 

a.string arguments...

a.string``a.strings

a.strings "isnovid","a" # true 

a.object arguments...

a.object``a.objects

a.objects {}[](->)/(\w+)\s(\w+)/ # true 
a.object null # false 
a.object undefined # false 

a.array arguments...

a.array``a.arrays

a.arrays [][1,2][1..10# true 
a.array arguments # false 
a.array {} # false 

a.function arguments...

a.function``a.functions

a.functions ( -> )class-> # true 
a.function new -> # false 
a.function new class # false 

a.arguments arguments...

a.arguments

a.arguments arguments # true 
a.arguments {} # false 
a.arguments [# false 

a.date arguments...

a.date,a.dates

a.date new Date # true 

a.element arguments...

a.element``a.arguments

a.element document.getElementById('project') # true 

a.finite arguments...

a.finite``a.finities

a.finite 17 # true 
a.finite Infinity # false 

a.nan arguments...

a.nan``a.NaN``a.Nan

a.nan NaN # true 

a.reg arguments...

a.reg``a.regex``a.regexp``a.regExp``a.RegExp``a.regularExpression

a.reg /(\w+)\s(\w+)/ # true 

a.empty arguments...

a.empty``a.empties

a.empties ""0[]{}->nullundefined # true 
a.empty [1..10# false 

a.equal arguments...

a.equal``a.equals

a.equal {name:"isnovid.a"},{name:"isnovid.a"},{name:"isnovid.a"} # true 
a.equals (-> true),(-> true),(-> true) # true 

a.of instances..., prototype

a.of``a.instanceof

With coffeescript classes.

= class 
= new B
= class extends B
= new C
a.of c,b,# true 

With standart function prototype.

= ->
= new B
= ->
C.prototype = b
= new C
a.of c,b,# true 

Cycles

Sometimes you need to do a complex operation in the condition does not fit into a standard system of cycles. Also, loops embedded in the library used immediately logic conditions "and" and "or", which allows greatly simplify the code. Logical "or", executes the handler until until it returns true. Otherwise, the cycle will return false. Logical "or", executes the handler until until it returns true. Otherwise, the cycle will return false.

a.or counter, handler

a.or 4(count) -> count is 2 # true 

a.and counter, handler

a.and 4(count) -> count < 2 # false 

a.or container, handler

a.or { a: 1b: 2 }(value, key) -> a.number value # true 

a.and container, handler

a.and { a: 1b: 2 }(value, key) -> a.number value  # true 

a.or varibles..., handler

a.or a.stringa.number(method) -> method "string" # true 

a.and varibles..., handler

a.and [1..10]...(value,key) -> a.number value # true 

Contents

a.has container, keys...

a.has,a.key,a.keys

data =
    b: null
    c: undefined
    d: true
 
a.keys data,"b","c","d" # true 
a.keys data,"b","c","f" # false