ES2015 first look / babeljs

This commit is contained in:
RainLoop Team 2015-11-15 03:23:16 +03:00
parent 5dcceaaca5
commit 445cd155e5
123 changed files with 3214 additions and 3680 deletions

View file

@ -1,54 +0,0 @@
(function () {
'use strict';
/**
* @constructor
*/
function ClientStorage()
{
var
NextStorageDriver = require('_').find([
require('Common/ClientStorageDriver/LocalStorage'),
require('Common/ClientStorageDriver/Cookie')
], function (NextStorageDriver) {
return NextStorageDriver && NextStorageDriver.supported();
})
;
this.oDriver = null;
if (NextStorageDriver)
{
this.oDriver = new NextStorageDriver();
}
}
/**
* @type {LocalStorageDriver|CookieDriver|null}
*/
ClientStorage.prototype.oDriver = null;
/**
* @param {number} iKey
* @param {*} mData
* @return {boolean}
*/
ClientStorage.prototype.set = function (iKey, mData)
{
return this.oDriver ? this.oDriver.set('p' + iKey, mData) : false;
};
/**
* @param {number} iKey
* @return {*}
*/
ClientStorage.prototype.get = function (iKey)
{
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
};
module.exports = new ClientStorage();
}());