Initial
This commit is contained in:
27
resources/app/node_modules/intl-format-cache/LICENSE
generated
vendored
Normal file
27
resources/app/node_modules/intl-format-cache/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
Copyright 2014 Yahoo! Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the Yahoo! Inc. nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
4
resources/app/node_modules/intl-format-cache/index.js
generated
vendored
Normal file
4
resources/app/node_modules/intl-format-cache/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
|
||||
exports = module.exports = require('./lib/memoizer')['default'];
|
||||
exports['default'] = exports;
|
||||
79
resources/app/node_modules/intl-format-cache/lib/es5.js
generated
vendored
Normal file
79
resources/app/node_modules/intl-format-cache/lib/es5.js
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
"use strict";
|
||||
/*
|
||||
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
||||
Copyrights licensed under the New BSD License.
|
||||
See the accompanying LICENSE file for terms.
|
||||
*/
|
||||
|
||||
/* jslint esnext: true */
|
||||
|
||||
// Function.prototype.bind implementation from Mozilla Developer Network:
|
||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Polyfill
|
||||
|
||||
var bind = Function.prototype.bind || function (oThis) {
|
||||
if (typeof this !== 'function') {
|
||||
// closest thing possible to the ECMAScript 5
|
||||
// internal IsCallable function
|
||||
throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
|
||||
}
|
||||
|
||||
var aArgs = Array.prototype.slice.call(arguments, 1),
|
||||
fToBind = this,
|
||||
fNOP = function() {},
|
||||
fBound = function() {
|
||||
return fToBind.apply(this instanceof fNOP
|
||||
? this
|
||||
: oThis,
|
||||
aArgs.concat(Array.prototype.slice.call(arguments)));
|
||||
};
|
||||
|
||||
if (this.prototype) {
|
||||
// native functions don't have a prototype
|
||||
fNOP.prototype = this.prototype;
|
||||
}
|
||||
fBound.prototype = new fNOP();
|
||||
|
||||
return fBound;
|
||||
};
|
||||
|
||||
// Purposely using the same implementation as the Intl.js `Intl` polyfill.
|
||||
// Copyright 2013 Andy Earnshaw, MIT License
|
||||
|
||||
var hop = Object.prototype.hasOwnProperty;
|
||||
|
||||
var realDefineProp = (function () {
|
||||
try { return !!Object.defineProperty({}, 'a', {}); }
|
||||
catch (e) { return false; }
|
||||
})();
|
||||
|
||||
var es3 = !realDefineProp && !Object.prototype.__defineGetter__;
|
||||
|
||||
var defineProperty = realDefineProp ? Object.defineProperty :
|
||||
function (obj, name, desc) {
|
||||
|
||||
if ('get' in desc && obj.__defineGetter__) {
|
||||
obj.__defineGetter__(name, desc.get);
|
||||
} else if (!hop.call(obj, name) || 'value' in desc) {
|
||||
obj[name] = desc.value;
|
||||
}
|
||||
};
|
||||
|
||||
var objCreate = Object.create || function (proto, props) {
|
||||
var obj, k;
|
||||
|
||||
function F() {}
|
||||
F.prototype = proto;
|
||||
obj = new F();
|
||||
|
||||
for (k in props) {
|
||||
if (hop.call(props, k)) {
|
||||
defineProperty(obj, k, props[k]);
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
};
|
||||
|
||||
exports.bind = bind, exports.defineProperty = defineProperty, exports.objCreate = objCreate;
|
||||
|
||||
//# sourceMappingURL=es5.js.map
|
||||
75
resources/app/node_modules/intl-format-cache/lib/memoizer.js
generated
vendored
Normal file
75
resources/app/node_modules/intl-format-cache/lib/memoizer.js
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
"use strict";
|
||||
var src$es5$$ = require("./es5");
|
||||
exports["default"] = createFormatCache;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
function createFormatCache(FormatConstructor) {
|
||||
var cache = src$es5$$.objCreate(null);
|
||||
|
||||
return function () {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
var cacheId = getCacheId(args);
|
||||
var format = cacheId && cache[cacheId];
|
||||
|
||||
if (!format) {
|
||||
format = new (src$es5$$.bind.apply(FormatConstructor, [null].concat(args)))();
|
||||
|
||||
if (cacheId) {
|
||||
cache[cacheId] = format;
|
||||
}
|
||||
}
|
||||
|
||||
return format;
|
||||
};
|
||||
}
|
||||
|
||||
// -- Utilities ----------------------------------------------------------------
|
||||
|
||||
function getCacheId(inputs) {
|
||||
// When JSON is not available in the runtime, we will not create a cache id.
|
||||
if (typeof JSON === 'undefined') { return; }
|
||||
|
||||
var cacheId = [];
|
||||
|
||||
var i, len, input;
|
||||
|
||||
for (i = 0, len = inputs.length; i < len; i += 1) {
|
||||
input = inputs[i];
|
||||
|
||||
if (input && typeof input === 'object') {
|
||||
cacheId.push(orderedProps(input));
|
||||
} else {
|
||||
cacheId.push(input);
|
||||
}
|
||||
}
|
||||
|
||||
return JSON.stringify(cacheId);
|
||||
}
|
||||
|
||||
function orderedProps(obj) {
|
||||
var props = [],
|
||||
keys = [];
|
||||
|
||||
var key, i, len, prop;
|
||||
|
||||
for (key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
keys.push(key);
|
||||
}
|
||||
}
|
||||
|
||||
var orderedKeys = keys.sort();
|
||||
|
||||
for (i = 0, len = orderedKeys.length; i < len; i += 1) {
|
||||
key = orderedKeys[i];
|
||||
prop = {};
|
||||
|
||||
prop[key] = obj[key];
|
||||
props[i] = prop;
|
||||
}
|
||||
|
||||
return props;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=memoizer.js.map
|
||||
30
resources/app/node_modules/intl-format-cache/package.json
generated
vendored
Normal file
30
resources/app/node_modules/intl-format-cache/package.json
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "intl-format-cache",
|
||||
"version": "2.0.5",
|
||||
"description": "A memoizer factory for Intl format constructors.",
|
||||
"main": "index.js",
|
||||
"jsnext:main": "src/memoizer.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/yahoo/intl-format-cache.git"
|
||||
},
|
||||
"author": "Eric Ferraiuolo <eferraiuolo@gmail.com>",
|
||||
"license": "BSD-3-Clause",
|
||||
"homepage": "https://github.com/yahoo/intl-format-cache",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"browserify": "^12.0.1",
|
||||
"expect": "^1.13.0",
|
||||
"grunt": "^0.4.5",
|
||||
"grunt-bundle-jsnext-lib": "^0.5.0",
|
||||
"grunt-cli": "^0.1.13",
|
||||
"grunt-contrib-clean": "^0.6.0",
|
||||
"grunt-contrib-connect": "^0.11.2",
|
||||
"grunt-contrib-copy": "^0.7.0",
|
||||
"grunt-saucelabs": "^8.6.1",
|
||||
"intl": "^1.0.1",
|
||||
"intl-messageformat": "^1.2.0",
|
||||
"intl-relativeformat": "^1.2.0",
|
||||
"mocha": "^2.3.4"
|
||||
}
|
||||
}
|
||||
76
resources/app/node_modules/intl-format-cache/src/es5.js
generated
vendored
Normal file
76
resources/app/node_modules/intl-format-cache/src/es5.js
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
||||
Copyrights licensed under the New BSD License.
|
||||
See the accompanying LICENSE file for terms.
|
||||
*/
|
||||
|
||||
/* jslint esnext: true */
|
||||
|
||||
// Function.prototype.bind implementation from Mozilla Developer Network:
|
||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Polyfill
|
||||
|
||||
var bind = Function.prototype.bind || function (oThis) {
|
||||
if (typeof this !== 'function') {
|
||||
// closest thing possible to the ECMAScript 5
|
||||
// internal IsCallable function
|
||||
throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
|
||||
}
|
||||
|
||||
var aArgs = Array.prototype.slice.call(arguments, 1),
|
||||
fToBind = this,
|
||||
fNOP = function() {},
|
||||
fBound = function() {
|
||||
return fToBind.apply(this instanceof fNOP
|
||||
? this
|
||||
: oThis,
|
||||
aArgs.concat(Array.prototype.slice.call(arguments)));
|
||||
};
|
||||
|
||||
if (this.prototype) {
|
||||
// native functions don't have a prototype
|
||||
fNOP.prototype = this.prototype;
|
||||
}
|
||||
fBound.prototype = new fNOP();
|
||||
|
||||
return fBound;
|
||||
};
|
||||
|
||||
// Purposely using the same implementation as the Intl.js `Intl` polyfill.
|
||||
// Copyright 2013 Andy Earnshaw, MIT License
|
||||
|
||||
var hop = Object.prototype.hasOwnProperty;
|
||||
|
||||
var realDefineProp = (function () {
|
||||
try { return !!Object.defineProperty({}, 'a', {}); }
|
||||
catch (e) { return false; }
|
||||
})();
|
||||
|
||||
var es3 = !realDefineProp && !Object.prototype.__defineGetter__;
|
||||
|
||||
var defineProperty = realDefineProp ? Object.defineProperty :
|
||||
function (obj, name, desc) {
|
||||
|
||||
if ('get' in desc && obj.__defineGetter__) {
|
||||
obj.__defineGetter__(name, desc.get);
|
||||
} else if (!hop.call(obj, name) || 'value' in desc) {
|
||||
obj[name] = desc.value;
|
||||
}
|
||||
};
|
||||
|
||||
var objCreate = Object.create || function (proto, props) {
|
||||
var obj, k;
|
||||
|
||||
function F() {}
|
||||
F.prototype = proto;
|
||||
obj = new F();
|
||||
|
||||
for (k in props) {
|
||||
if (hop.call(props, k)) {
|
||||
defineProperty(obj, k, props[k]);
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
};
|
||||
|
||||
export {bind, defineProperty, objCreate};
|
||||
81
resources/app/node_modules/intl-format-cache/src/memoizer.js
generated
vendored
Normal file
81
resources/app/node_modules/intl-format-cache/src/memoizer.js
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
||||
Copyrights licensed under the New BSD License.
|
||||
See the accompanying LICENSE file for terms.
|
||||
*/
|
||||
|
||||
/* jshint esnext: true */
|
||||
|
||||
import {bind, objCreate} from './es5';
|
||||
|
||||
export default createFormatCache;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
function createFormatCache(FormatConstructor) {
|
||||
var cache = objCreate(null);
|
||||
|
||||
return function () {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
var cacheId = getCacheId(args);
|
||||
var format = cacheId && cache[cacheId];
|
||||
|
||||
if (!format) {
|
||||
format = new (bind.apply(FormatConstructor, [null].concat(args)))();
|
||||
|
||||
if (cacheId) {
|
||||
cache[cacheId] = format;
|
||||
}
|
||||
}
|
||||
|
||||
return format;
|
||||
};
|
||||
}
|
||||
|
||||
// -- Utilities ----------------------------------------------------------------
|
||||
|
||||
function getCacheId(inputs) {
|
||||
// When JSON is not available in the runtime, we will not create a cache id.
|
||||
if (typeof JSON === 'undefined') { return; }
|
||||
|
||||
var cacheId = [];
|
||||
|
||||
var i, len, input;
|
||||
|
||||
for (i = 0, len = inputs.length; i < len; i += 1) {
|
||||
input = inputs[i];
|
||||
|
||||
if (input && typeof input === 'object') {
|
||||
cacheId.push(orderedProps(input));
|
||||
} else {
|
||||
cacheId.push(input);
|
||||
}
|
||||
}
|
||||
|
||||
return JSON.stringify(cacheId);
|
||||
}
|
||||
|
||||
function orderedProps(obj) {
|
||||
var props = [],
|
||||
keys = [];
|
||||
|
||||
var key, i, len, prop;
|
||||
|
||||
for (key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
keys.push(key);
|
||||
}
|
||||
}
|
||||
|
||||
var orderedKeys = keys.sort();
|
||||
|
||||
for (i = 0, len = orderedKeys.length; i < len; i += 1) {
|
||||
key = orderedKeys[i];
|
||||
prop = {};
|
||||
|
||||
prop[key] = obj[key];
|
||||
props[i] = prop;
|
||||
}
|
||||
|
||||
return props;
|
||||
}
|
||||
Reference in New Issue
Block a user