Initial commit
This commit is contained in:
21
node_modules/classnames/LICENSE
generated
vendored
Normal file
21
node_modules/classnames/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Jed Watson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
49
node_modules/classnames/bind.js
generated
vendored
Normal file
49
node_modules/classnames/bind.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
/*!
|
||||
Copyright (c) 2017 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
||||
/* global define */
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var hasOwn = {}.hasOwnProperty;
|
||||
|
||||
function classNames () {
|
||||
var classes = [];
|
||||
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var arg = arguments[i];
|
||||
if (!arg) continue;
|
||||
|
||||
var argType = typeof arg;
|
||||
|
||||
if (argType === 'string' || argType === 'number') {
|
||||
classes.push(this && this[arg] || arg);
|
||||
} else if (Array.isArray(arg)) {
|
||||
classes.push(classNames.apply(this, arg));
|
||||
} else if (argType === 'object') {
|
||||
for (var key in arg) {
|
||||
if (hasOwn.call(arg, key) && arg[key]) {
|
||||
classes.push(this && this[key] || key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return classes.join(' ');
|
||||
}
|
||||
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
classNames.default = classNames;
|
||||
module.exports = classNames;
|
||||
} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
|
||||
// register as 'classnames', consistent with npm package name
|
||||
define('classnames', [], function () {
|
||||
return classNames;
|
||||
});
|
||||
} else {
|
||||
window.classNames = classNames;
|
||||
}
|
||||
}());
|
||||
110
node_modules/classnames/dedupe.js
generated
vendored
Normal file
110
node_modules/classnames/dedupe.js
generated
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
/*!
|
||||
Copyright (c) 2017 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
||||
/* global define */
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var classNames = (function () {
|
||||
// don't inherit from Object so we can skip hasOwnProperty check later
|
||||
// http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232
|
||||
function StorageObject() {}
|
||||
StorageObject.prototype = Object.create(null);
|
||||
|
||||
function _parseArray (resultSet, array) {
|
||||
var length = array.length;
|
||||
|
||||
for (var i = 0; i < length; ++i) {
|
||||
_parse(resultSet, array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
var hasOwn = {}.hasOwnProperty;
|
||||
|
||||
function _parseNumber (resultSet, num) {
|
||||
resultSet[num] = true;
|
||||
}
|
||||
|
||||
function _parseObject (resultSet, object) {
|
||||
for (var k in object) {
|
||||
if (hasOwn.call(object, k)) {
|
||||
// set value to false instead of deleting it to avoid changing object structure
|
||||
// https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions
|
||||
resultSet[k] = !!object[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var SPACE = /\s+/;
|
||||
function _parseString (resultSet, str) {
|
||||
var array = str.split(SPACE);
|
||||
var length = array.length;
|
||||
|
||||
for (var i = 0; i < length; ++i) {
|
||||
resultSet[array[i]] = true;
|
||||
}
|
||||
}
|
||||
|
||||
function _parse (resultSet, arg) {
|
||||
if (!arg) return;
|
||||
var argType = typeof arg;
|
||||
|
||||
// 'foo bar'
|
||||
if (argType === 'string') {
|
||||
_parseString(resultSet, arg);
|
||||
|
||||
// ['foo', 'bar', ...]
|
||||
} else if (Array.isArray(arg)) {
|
||||
_parseArray(resultSet, arg);
|
||||
|
||||
// { 'foo': true, ... }
|
||||
} else if (argType === 'object') {
|
||||
_parseObject(resultSet, arg);
|
||||
|
||||
// '130'
|
||||
} else if (argType === 'number') {
|
||||
_parseNumber(resultSet, arg);
|
||||
}
|
||||
}
|
||||
|
||||
function _classNames () {
|
||||
// don't leak arguments
|
||||
// https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
|
||||
var len = arguments.length;
|
||||
var args = Array(len);
|
||||
for (var i = 0; i < len; i++) {
|
||||
args[i] = arguments[i];
|
||||
}
|
||||
|
||||
var classSet = new StorageObject();
|
||||
_parseArray(classSet, args);
|
||||
|
||||
var list = [];
|
||||
|
||||
for (var k in classSet) {
|
||||
if (classSet[k]) {
|
||||
list.push(k)
|
||||
}
|
||||
}
|
||||
|
||||
return list.join(' ');
|
||||
}
|
||||
|
||||
return _classNames;
|
||||
})();
|
||||
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
classNames.default = classNames;
|
||||
module.exports = classNames;
|
||||
} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
|
||||
// register as 'classnames', consistent with npm package name
|
||||
define('classnames', [], function () {
|
||||
return classNames;
|
||||
});
|
||||
} else {
|
||||
window.classNames = classNames;
|
||||
}
|
||||
}());
|
||||
52
node_modules/classnames/index.js
generated
vendored
Normal file
52
node_modules/classnames/index.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/*!
|
||||
Copyright (c) 2017 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
||||
/* global define */
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var hasOwn = {}.hasOwnProperty;
|
||||
|
||||
function classNames () {
|
||||
var classes = [];
|
||||
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var arg = arguments[i];
|
||||
if (!arg) continue;
|
||||
|
||||
var argType = typeof arg;
|
||||
|
||||
if (argType === 'string' || argType === 'number') {
|
||||
classes.push(arg);
|
||||
} else if (Array.isArray(arg) && arg.length) {
|
||||
var inner = classNames.apply(null, arg);
|
||||
if (inner) {
|
||||
classes.push(inner);
|
||||
}
|
||||
} else if (argType === 'object') {
|
||||
for (var key in arg) {
|
||||
if (hasOwn.call(arg, key) && arg[key]) {
|
||||
classes.push(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return classes.join(' ');
|
||||
}
|
||||
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
classNames.default = classNames;
|
||||
module.exports = classNames;
|
||||
} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
|
||||
// register as 'classnames', consistent with npm package name
|
||||
define('classnames', [], function () {
|
||||
return classNames;
|
||||
});
|
||||
} else {
|
||||
window.classNames = classNames;
|
||||
}
|
||||
}());
|
||||
18
node_modules/classnames/package.json
generated
vendored
Normal file
18
node_modules/classnames/package.json
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "classnames",
|
||||
"version": "2.2.6",
|
||||
"description": "A simple utility for conditionally joining classNames together",
|
||||
"main": "index.js",
|
||||
"author": "Jed Watson",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/JedWatson/classnames.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"benchmark": "^1.0.0",
|
||||
"browserify": "^14.1.0",
|
||||
"mocha": "^2.1.0",
|
||||
"opn-cli": "^3.1.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user