1.0.12 • Published 8 years ago
bito.utils v1.0.12
bito.utils
Description
Utilities javascript to Node.js
Install
As it is simple and useful javascript functions, you can download the package for server node.js
$ npm install bito.utils
## How to use
The following example attaches bito.utils to a plain Node.JS
HTTP server listening on port `3005`.
```js
/**
* Running node.js
*/
var http = require('http').createServer();
http.listen('3005');
/**
* How to Use
* String.format example
*/
var bito = require('bito.utils');
var bDate = new index.Date();
console.log(bDate.toDate(new Date()));
Strings
/**
* How to Use
* String.format example
*/
var bito = require('bito.utils');
var bString = new index.String();
console.log(bString.format("{0} to {1}", "bito.utils", "node.js"));
Output
bito.utils to node.js
Dates
/**
* How to Use
* String.format example
*/
var bito = require('bito.utils');
var bDate = new index.Date();
console.log(bDate.toDateTime(new Date()));
console.log(bDate.toTime(new Date()));
console.log(bDate.toDate(new Date()));
Output
2016/10/08 8:14:41
8:14:41
2016/91/08