0.1.1 • Published 6 years ago

xtypejs-name-scheme-shortened v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

xtypejs - Name scheme: shortened

Installation with npm

npm install xtypejs-name-scheme-shortened --save

NodeJs import and setup

var xtype = require('xtypejs');
var xtypejsShortenedNameScheme = require('xtypejs-name-scheme-shortened');

// Either: Simple setup

xtype.options.setNameScheme(xtypejsShortenedNameScheme);

// Or: To first register name scheme internally for later
// reference by name, for switching between name schemes:

xtype.ext.registerNameScheme('shortened', xtypejsShortenedNameScheme);
xtype.options.setNameScheme('shortened');

// Scheme is now active here

HTML script tag import and setup

<!--
    Include name scheme script after xtypejs script 
    to automatically register the name scheme into
    xtypejs with the default scheme name: 'shortened'
-->

<script src="path/to/xtype.js"></script>
<script src="path/to/xtypejs-name-scheme-shortened.js"></script>

<script>
    xtype.options.setNameScheme('shortened');
    // Scheme is now active here
</script>

Usage

For general documentation on using custom name schemes, see:

Type names in scheme


Type Default NameName in Scheme
nullnull
undefinedundef
nannan
symbolsymb
functionfunc
datedate
errorerr
regexpregex
booleanbool
truetrue
falsefalse
stringstr
whitespacespace
single_char_stringone_char_str
multi_char_stringmulti_char_str
empty_stringempty_str
blank_stringblank_str
non_empty_stringnon_empty_str
non_blank_stringnon_blank_str
numbernum
positive_numberpos_num
negative_numberneg_num
zerozero
non_positive_numbernon_pos_num
non_negative_numbernon_neg_num
non_zero_numbernon_zero_num
integerint
positive_integerpos_int
negative_integerneg_int
floatfloat
positive_floatpos_float
negative_floatneg_float
infinite_numberinf
positive_infinitypos_inf
negative_infinityneg_inf
non_infinite_numbernon_inf_num
arrayarr
empty_arrayempty_arr
single_elem_arrayone_elem_arr
multi_elem_arraymulti_elem_arr
non_empty_arraynon_empty_arr
objectobj
empty_objectempty_obj
single_prop_objectone_prop_obj
multi_prop_objectmulti_prop_obj
non_empty_objectnon_empty_obj
primitiveprim
nothingnil
anyany
nonenone