Added Gulp.js for compiling SCSS stylesheets
This commit is contained in:
20
node_modules/es5-ext/function/#/compose.js
generated
vendored
Normal file
20
node_modules/es5-ext/function/#/compose.js
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
|
||||
var isValue = require("../../object/is-value")
|
||||
, callable = require("../../object/valid-callable")
|
||||
, aFrom = require("../../array/from");
|
||||
|
||||
var apply = Function.prototype.apply
|
||||
, call = Function.prototype.call
|
||||
, callFn = function (arg, fn) { return call.call(fn, this, arg); };
|
||||
|
||||
module.exports = function (fnIgnored /*, …fnn*/) {
|
||||
var fns, first;
|
||||
var args = aFrom(arguments);
|
||||
fns = isValue(this) ? [this].concat(args) : args;
|
||||
fns.forEach(callable);
|
||||
fns = fns.reverse();
|
||||
first = fns[0];
|
||||
fns = fns.slice(1);
|
||||
return function (argIgnored) { return fns.reduce(callFn, apply.call(first, this, arguments)); };
|
||||
};
|
22
node_modules/es5-ext/function/#/copy.js
generated
vendored
Normal file
22
node_modules/es5-ext/function/#/copy.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
var mixin = require("../../object/mixin")
|
||||
, validFunction = require("../valid-function")
|
||||
, re = /^\s*function\s*([\0-')-\uffff]+)*\s*\(([\0-(*-\uffff]*)\)\s*\{/;
|
||||
|
||||
module.exports = function () {
|
||||
var match = String(validFunction(this)).match(re), fn;
|
||||
|
||||
// eslint-disable-next-line no-new-func
|
||||
fn = new Function(
|
||||
"fn",
|
||||
"return function " +
|
||||
match[1].trim() +
|
||||
"(" +
|
||||
match[2] +
|
||||
") { return fn.apply(this, arguments); };"
|
||||
)(this);
|
||||
try { mixin(fn, this); }
|
||||
catch (ignore) {}
|
||||
return fn;
|
||||
};
|
25
node_modules/es5-ext/function/#/curry.js
generated
vendored
Normal file
25
node_modules/es5-ext/function/#/curry.js
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
|
||||
var toPosInt = require("../../number/to-pos-integer")
|
||||
, callable = require("../../object/valid-callable")
|
||||
, defineLength = require("../_define-length")
|
||||
, slice = Array.prototype.slice
|
||||
, apply = Function.prototype.apply
|
||||
, curry;
|
||||
|
||||
curry = function self(fn, length, preArgs) {
|
||||
return defineLength(
|
||||
function () {
|
||||
var args = preArgs
|
||||
? preArgs.concat(slice.call(arguments, 0, length - preArgs.length))
|
||||
: slice.call(arguments, 0, length);
|
||||
return args.length === length ? apply.call(fn, this, args) : self(fn, length, args);
|
||||
},
|
||||
preArgs ? length - preArgs.length : length
|
||||
);
|
||||
};
|
||||
|
||||
module.exports = function (/* Length*/) {
|
||||
var length = arguments[0];
|
||||
return curry(callable(this), isNaN(length) ? toPosInt(this.length) : toPosInt(length));
|
||||
};
|
13
node_modules/es5-ext/function/#/index.js
generated
vendored
Normal file
13
node_modules/es5-ext/function/#/index.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
compose: require("./compose"),
|
||||
copy: require("./copy"),
|
||||
curry: require("./curry"),
|
||||
lock: require("./lock"),
|
||||
microtaskDelay: require("./microtask-delay"),
|
||||
not: require("./not"),
|
||||
partial: require("./partial"),
|
||||
spread: require("./spread"),
|
||||
toStringTokens: require("./to-string-tokens")
|
||||
};
|
10
node_modules/es5-ext/function/#/lock.js
generated
vendored
Normal file
10
node_modules/es5-ext/function/#/lock.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
var callable = require("../../object/valid-callable")
|
||||
, apply = Function.prototype.apply;
|
||||
|
||||
module.exports = function (/* …args*/) {
|
||||
var fn = callable(this), args = arguments;
|
||||
|
||||
return function () { return apply.call(fn, this, args); };
|
||||
};
|
12
node_modules/es5-ext/function/#/microtask-delay.js
generated
vendored
Normal file
12
node_modules/es5-ext/function/#/microtask-delay.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
|
||||
var ensurePlainFunction = require("../../object/ensure-plain-function")
|
||||
, defineLength = require("../_define-length")
|
||||
, nextTick = require("next-tick");
|
||||
|
||||
var apply = Function.prototype.apply;
|
||||
|
||||
module.exports = function () {
|
||||
var src = ensurePlainFunction(this);
|
||||
return defineLength(function () { nextTick(apply.bind(src, this, arguments)); }, this.length);
|
||||
};
|
11
node_modules/es5-ext/function/#/not.js
generated
vendored
Normal file
11
node_modules/es5-ext/function/#/not.js
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
var callable = require("../../object/valid-callable")
|
||||
, defineLength = require("../_define-length")
|
||||
, apply = Function.prototype.apply;
|
||||
|
||||
module.exports = function () {
|
||||
var fn = callable(this);
|
||||
|
||||
return defineLength(function () { return !apply.call(fn, this, arguments); }, fn.length);
|
||||
};
|
14
node_modules/es5-ext/function/#/partial.js
generated
vendored
Normal file
14
node_modules/es5-ext/function/#/partial.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
var callable = require("../../object/valid-callable")
|
||||
, aFrom = require("../../array/from")
|
||||
, defineLength = require("../_define-length")
|
||||
, apply = Function.prototype.apply;
|
||||
|
||||
module.exports = function (/* …args*/) {
|
||||
var fn = callable(this), args = aFrom(arguments);
|
||||
|
||||
return defineLength(function () {
|
||||
return apply.call(fn, this, args.concat(aFrom(arguments)));
|
||||
}, fn.length - args.length);
|
||||
};
|
9
node_modules/es5-ext/function/#/spread.js
generated
vendored
Normal file
9
node_modules/es5-ext/function/#/spread.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
var callable = require("../../object/valid-callable")
|
||||
, apply = Function.prototype.apply;
|
||||
|
||||
module.exports = function () {
|
||||
var fn = callable(this);
|
||||
return function (args) { return apply.call(fn, this, args); };
|
||||
};
|
17
node_modules/es5-ext/function/#/to-string-tokens.js
generated
vendored
Normal file
17
node_modules/es5-ext/function/#/to-string-tokens.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
var validFunction = require("../valid-function");
|
||||
|
||||
var re1 = /^\s*function[\0-')-\uffff]*\(([\0-(*-\uffff]*)\)\s*\{([\0-\uffff]*)\}\s*$/
|
||||
, re2 = /^\s*\(?([\0-'*-\uffff]*)\)?\s*=>\s*(\{?[\0-\uffff]*\}?)\s*$/;
|
||||
|
||||
module.exports = function () {
|
||||
var str = String(validFunction(this)), data = str.match(re1);
|
||||
if (!data) {
|
||||
data = str.match(re2);
|
||||
if (!data) throw new Error("Unrecognized string format");
|
||||
data[1] = data[1].trim();
|
||||
if (data[2][0] === "{") data[2] = data[2].trim().slice(1, -1);
|
||||
}
|
||||
return { args: data[1], body: data[2] };
|
||||
};
|
54
node_modules/es5-ext/function/_define-length.js
generated
vendored
Normal file
54
node_modules/es5-ext/function/_define-length.js
generated
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
|
||||
var toPosInt = require("../number/to-pos-integer");
|
||||
|
||||
var test = function (arg1, arg2) { return arg2; };
|
||||
|
||||
var desc, defineProperty, generate, mixin;
|
||||
|
||||
try {
|
||||
Object.defineProperty(test, "length", {
|
||||
configurable: true,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
value: 1
|
||||
});
|
||||
}
|
||||
catch (ignore) {}
|
||||
|
||||
if (test.length === 1) {
|
||||
// ES6
|
||||
desc = { configurable: true, writable: false, enumerable: false };
|
||||
defineProperty = Object.defineProperty;
|
||||
module.exports = function (fn, length) {
|
||||
length = toPosInt(length);
|
||||
if (fn.length === length) return fn;
|
||||
desc.value = length;
|
||||
return defineProperty(fn, "length", desc);
|
||||
};
|
||||
} else {
|
||||
mixin = require("../object/mixin");
|
||||
generate = (function () {
|
||||
var cache = [];
|
||||
return function (length) {
|
||||
var args, i = 0;
|
||||
if (cache[length]) return cache[length];
|
||||
args = [];
|
||||
while (length--) args.push("a" + (++i).toString(36));
|
||||
// eslint-disable-next-line no-new-func
|
||||
return new Function(
|
||||
"fn",
|
||||
"return function (" + args.join(", ") + ") { return fn.apply(this, arguments); };"
|
||||
);
|
||||
};
|
||||
})();
|
||||
module.exports = function (src, length) {
|
||||
var target;
|
||||
length = toPosInt(length);
|
||||
if (src.length === length) return src;
|
||||
target = generate(length)(src);
|
||||
try { mixin(target, src); }
|
||||
catch (ignore) {}
|
||||
return target;
|
||||
};
|
||||
}
|
5
node_modules/es5-ext/function/constant.js
generated
vendored
Normal file
5
node_modules/es5-ext/function/constant.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function (value) {
|
||||
return function () { return value; };
|
||||
};
|
3
node_modules/es5-ext/function/identity.js
generated
vendored
Normal file
3
node_modules/es5-ext/function/identity.js
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function (value) { return value; };
|
15
node_modules/es5-ext/function/index.js
generated
vendored
Normal file
15
node_modules/es5-ext/function/index.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
// Export all modules.
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"#": require("./#"),
|
||||
"constant": require("./constant"),
|
||||
"identity": require("./identity"),
|
||||
"invoke": require("./invoke"),
|
||||
"isArguments": require("./is-arguments"),
|
||||
"isFunction": require("./is-function"),
|
||||
"noop": require("./noop"),
|
||||
"pluck": require("./pluck"),
|
||||
"validFunction": require("./valid-function")
|
||||
};
|
14
node_modules/es5-ext/function/invoke.js
generated
vendored
Normal file
14
node_modules/es5-ext/function/invoke.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
var isCallable = require("../object/is-callable")
|
||||
, value = require("../object/valid-value")
|
||||
, slice = Array.prototype.slice
|
||||
, apply = Function.prototype.apply;
|
||||
|
||||
module.exports = function (name /*, …args*/) {
|
||||
var args = slice.call(arguments, 1), isFn = isCallable(name);
|
||||
return function (obj) {
|
||||
value(obj);
|
||||
return apply.call(isFn ? name : obj[name], obj, args.concat(slice.call(arguments, 1)));
|
||||
};
|
||||
};
|
6
node_modules/es5-ext/function/is-arguments.js
generated
vendored
Normal file
6
node_modules/es5-ext/function/is-arguments.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var objToString = Object.prototype.toString
|
||||
, id = objToString.call((function () { return arguments; })());
|
||||
|
||||
module.exports = function (value) { return objToString.call(value) === id; };
|
8
node_modules/es5-ext/function/is-function.js
generated
vendored
Normal file
8
node_modules/es5-ext/function/is-function.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
var objToString = Object.prototype.toString
|
||||
, isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);
|
||||
|
||||
module.exports = function (value) {
|
||||
return typeof value === "function" && isFunctionStringTag(objToString.call(value));
|
||||
};
|
4
node_modules/es5-ext/function/noop.js
generated
vendored
Normal file
4
node_modules/es5-ext/function/noop.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
|
||||
// eslint-disable-next-line no-empty-function
|
||||
module.exports = function () {};
|
7
node_modules/es5-ext/function/pluck.js
generated
vendored
Normal file
7
node_modules/es5-ext/function/pluck.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
var value = require("../object/valid-value");
|
||||
|
||||
module.exports = function (name) {
|
||||
return function (obj) { return value(obj)[name]; };
|
||||
};
|
8
node_modules/es5-ext/function/valid-function.js
generated
vendored
Normal file
8
node_modules/es5-ext/function/valid-function.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
var isFunction = require("./is-function");
|
||||
|
||||
module.exports = function (value) {
|
||||
if (!isFunction(value)) throw new TypeError(value + " is not a function");
|
||||
return value;
|
||||
};
|
Reference in New Issue
Block a user