0.9.9-beta20 • Published 2 years ago

typehardeningrc v0.9.9-beta20

Weekly downloads
23
License
GPL-3.0-or-later
Repository
github
Last release
2 years ago

typeHardening

Type hardening is a simple type / type limit checker

init

const typeHardening =  new (require('./index.js')).base();

supported types

typecomment
any
array
boolean
float
function
integer
list
select
string

type object

const typeObject = {  // variable type description
       'type':'string', // variable type
       'list': [], // list of posible values (optional)
       'max': [], // maximum value limit (optional)
       'min': [] // minimum value limit (optional)
    },

check

typeHardening.check( 
    typeObject,
    'value' // checkable value
);

// expectation is boolean

getDefault value

typeHardening.getDefault( typeObject );


// expectation is any
0.9.9-beta20

2 years ago

0.9.9-beta19

3 years ago

0.9.9-beta17c

3 years ago

0.9.9-beta16b

3 years ago

0.9.9-beta17b

3 years ago

0.9.9-beta16

3 years ago

0.9.9-beta11

3 years ago

0.9.9-beta15

3 years ago

0.9.9-beta10

3 years ago

0.9.9-beta5

4 years ago

0.9.9-beta4

4 years ago

0.9.9-beta3

4 years ago

0.9.9-beta2

4 years ago

0.9.9-beta1

4 years ago

0.9.9-alpha

4 years ago