Crisp.CreateJS
represent a Class design pattern for JavaScript included multible namespaces, options and functions
// create objectvar myObject = Crisp; // initialice objectmyObject; // get object optionmyObject; // clone object without datavar cloneObject = myObject;
Index Table
Getting Started
Server-Nodes
Use Node Package Manager (npm) to install crisp-create
for Node.js and io.js
$ npm install crisp-create
// use package;
or use the OpenCrisp UtilJS wraper
$ npm install crisp-util
// use package;
Web-Clients
Use Bower to install crisp-create
for Browsers APP's and other front-end workflows.
$ bower install crisp-create
<!-- use package -->
or use the OpenCrisp UtilJS wraper
$ bower install crisp-util
<!-- use package -->
Development
Use Git to clone Crisp.CreateJS from GitHub to develop the repository with Grunt
# Clone:
$ git clone https://github.com/OpenCrisp/Crisp.CreateJS.git
# Build: test, concat, test, minify, test
$ grunt
# Test: original sourcecode for developer (included in build)
$ grunt t
# Run all test-scripts on Unix
$ sh grunt-tests.sh
Usage
How to use Crisp.CreateJS
function in JavaScript.
Crisp.utilCreate()
How to use Crisp.utilCreate( option )
with util.create
namespace.
var myObject = Crisp;
- option
option.ns utilCreate()
var myObject = Crisp; myObject; // truemyObject; // '{}'
option.options utilCreate()
var myObject = Crisp; myObject; // 'A'myObject; // '{}'
option.properties utilCreate()
var myObject = Crisp; myObjectb; // 'B'myObject; // '{"b":"B"}'
option.prototypes utilCreate()
var myObject = Crisp; myObject; // 'C'myObject; // '{}'
CreateJS function
.objIni()
How to use .objIni( option )
function on utilCreate object.
var myObject = Crisp; myObject; // 0
._()
How to use ._( name OR option )
function on utilCreate object.
// get the value of `test`myObject;// or with optionmyObject; // returns preset if option is undefinedmyObject;// or preset of functionmyObject; // returns preset if option is undefined and save the value on optionmyObject;// or preset of functionmyObject;
.objSet()
How to use .objSet( name, value )
function on utilCreate object.
myObject;
.objData()
How to use .objData( option )
function on utilCreate object.
myObject; myObjecta; // 'A'
.objClone()
How to use .objClone()
function on utilCreate object.
var cloneObject = myObject;
.objNs()
How to use .objNs( name )
function on utilCreate object.
myObject; // true
'util.create' is an default namespace