code stringlengths 24 2.07M | docstring stringlengths 25 85.3k | func_name stringlengths 1 92 | language stringclasses 1
value | repo stringlengths 5 64 | path stringlengths 4 172 | url stringlengths 44 218 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
close (err, cb) {
let expected = 0
for (const transport of targetStreams) {
expected++
transport.stream.on('close', closeCb)
transport.stream.end()
}
function closeCb () {
if (--expected === 0) {
cb(err)
}
}
} | Creates a pipeline using the provided streams and return an instance of `PassThrough` stream
as a source for the pipeline.
@param {(TransformStream|WritableStream)[]} streams An array of streams.
All intermediate streams in the array *MUST* be `Transform` streams and only the last one `Writable`.
@returns A `PassThr... | close | javascript | pinojs/pino | lib/worker.js | https://github.com/pinojs/pino/blob/master/lib/worker.js | MIT |
function closeCb () {
if (--expected === 0) {
cb(err)
}
} | Creates a pipeline using the provided streams and return an instance of `PassThrough` stream
as a source for the pipeline.
@param {(TransformStream|WritableStream)[]} streams An array of streams.
All intermediate streams in the array *MUST* be `Transform` streams and only the last one `Writable`.
@returns A `PassThr... | closeCb | javascript | pinojs/pino | lib/worker.js | https://github.com/pinojs/pino/blob/master/lib/worker.js | MIT |
function process (stream) {
const multi = pino.multistream(targetStreams, { levels, dedupe })
// TODO manage backpressure
stream.on('data', function (chunk) {
const { lastTime, lastMsg, lastObj, lastLevel } = this
multi.lastLevel = lastLevel
multi.lastTime = lastTime
multi.lastMsg = ... | Creates a pipeline using the provided streams and return an instance of `PassThrough` stream
as a source for the pipeline.
@param {(TransformStream|WritableStream)[]} streams An array of streams.
All intermediate streams in the array *MUST* be `Transform` streams and only the last one `Writable`.
@returns A `PassThr... | process | javascript | pinojs/pino | lib/worker.js | https://github.com/pinojs/pino/blob/master/lib/worker.js | MIT |
function createPipeline (streams) {
const ee = new EE()
const stream = new PassThrough({
autoDestroy: true,
destroy (_, cb) {
ee.on('error', cb)
ee.on('closed', cb)
}
})
pipeline(stream, ...streams, function (err) {
if (err && err.code !== 'ERR_STREAM_PREMATURE_C... | Creates a pipeline using the provided streams and return an instance of `PassThrough` stream
as a source for the pipeline.
@param {(TransformStream|WritableStream)[]} streams An array of streams.
All intermediate streams in the array *MUST* be `Transform` streams and only the last one `Writable`.
@returns A `PassThr... | createPipeline | javascript | pinojs/pino | lib/worker.js | https://github.com/pinojs/pino/blob/master/lib/worker.js | MIT |
destroy (_, cb) {
ee.on('error', cb)
ee.on('closed', cb)
} | Creates a pipeline using the provided streams and return an instance of `PassThrough` stream
as a source for the pipeline.
@param {(TransformStream|WritableStream)[]} streams An array of streams.
All intermediate streams in the array *MUST* be `Transform` streams and only the last one `Writable`.
@returns A `PassThr... | destroy | javascript | pinojs/pino | lib/worker.js | https://github.com/pinojs/pino/blob/master/lib/worker.js | MIT |
function Flightplan() {
this._targets = {};
this._flights = [];
this.runtime = Object.freeze({});
process.on('SIGINT', function() {
throw new errors.ProcessInterruptedError('Flightplan was interrupted');
});
process.on('uncaughtException', function(err) {
logger.error(err instanceof errors.BaseEr... | A flightplan is a set of subsequent flights to be executed on one or more
hosts. Configuration is handled with the `target()` method.
```javascript
var plan = require('flightplan');
```
### Flights
A flight is a set of commands to be executed on one or more hosts. There are
two types of flights:
#### Local flights
... | Flightplan | javascript | pstadler/flightplan | lib/index.js | https://github.com/pstadler/flightplan/blob/master/lib/index.js | MIT |
dynamicHosts = function() {
var future = new Future();
config.hosts(function(result) {
future.return(result);
}, context);
return future;
} | Register a remote flight. Remote flights are executed on the current
target's remote hosts defined with `target()`. When `fn` gets called
a `Transport` object is passed with the first argument.
```javascript
plan.remote(function(remote) {
remote.echo('hello from the remote host.');
});
```
An optional first paramet... | dynamicHosts | javascript | pstadler/flightplan | lib/index.js | https://github.com/pstadler/flightplan/blob/master/lib/index.js | MIT |
function Transport(context) {
this._context = context;
this._options = {
silent: false,
failsafe: false
};
this._execWith = '';
this._logger = logger({
debug: this._context.options.debug,
prefix: this._context.remote.host
});
this.runtime = Object.freeze(extend({}, this._context.remote))... | A transport is the interface you use during flights. Basically they
offer you a set of methods to execute a chain of commands. Depending on the
type of flight, this is either a `Shell` object for local
flights, or an `SSH` for remote flights. Both transports
expose the same set of methods as described in this section.
... | Transport | javascript | pstadler/flightplan | lib/transport/index.js | https://github.com/pstadler/flightplan/blob/master/lib/transport/index.js | MIT |
function task() {
var future = new Future();
fn(function(result) {
future.return(result);
});
return future;
} | Execute a function and return after the callback `done` is called.
This is used for running asynchronous functions in a synchronous way.
The callback takes an optional argument which is then returned by
`waitFor()`.
```javascript
var result = transport.waitFor(function(done) {
require('node-notifier').notify({
... | task | javascript | pstadler/flightplan | lib/transport/index.js | https://github.com/pstadler/flightplan/blob/master/lib/transport/index.js | MIT |
function findIndex( array, condition ) {
for ( let i = 0; i < array.length; ++i ) {
if ( condition( array[ i ], i ) ) return i;
}
return -1;
} | The `findIndex()` method returns the index of the first element in the array that satisfies the
provided testing function, otherwise `-1` is returned. | findIndex | javascript | pegjs/pegjs | packages/pegjs/lib/util/arrays.js | https://github.com/pegjs/pegjs/blob/master/packages/pegjs/lib/util/arrays.js | MIT |
function find( array, condition ) {
const index = findIndex( array, condition );
return index < 0 ? void 0 : array[ index ];
} | The `find()` method returns the value of the first element in the array that satisfies the
provided testing function, otherwise `undefined` is returned. | find | javascript | pegjs/pegjs | packages/pegjs/lib/util/arrays.js | https://github.com/pegjs/pegjs/blob/master/packages/pegjs/lib/util/arrays.js | MIT |
function convertStage( passes ) {
return Array.isArray( passes )
? passes
: objects.values( passes );
} | ```ts
type Session = peg.compiler.Session;
type Pass = ( ast: {}, session: Session, options: {} ) => void;
type StageMap = { [string]: { [string]: Pass } };
type PassMap = { [string]: Pass[] };
```
The PEG.js compiler runs each `Pass` on the `PassMap` (the `passes` option on it's 2nd
argument), but the compiler api ex... | convertStage | javascript | pegjs/pegjs | packages/pegjs/lib/util/index.js | https://github.com/pegjs/pegjs/blob/master/packages/pegjs/lib/util/index.js | MIT |
function convertPasses( stages ) {
return objects.map( stages, convertStage );
} | ```ts
type Session = peg.compiler.Session;
type Pass = ( ast: {}, session: Session, options: {} ) => void;
type StageMap = { [string]: { [string]: Pass } };
type PassMap = { [string]: Pass[] };
```
The PEG.js compiler runs each `Pass` on the `PassMap` (the `passes` option on it's 2nd
argument), but the compiler api ex... | convertPasses | javascript | pegjs/pegjs | packages/pegjs/lib/util/index.js | https://github.com/pegjs/pegjs/blob/master/packages/pegjs/lib/util/index.js | MIT |
function processOptions( options, defaults ) {
const processedOptions = {};
objects.extend( processedOptions, options );
objects.extend( processedOptions, defaults );
return processedOptions;
} | ```ts
type Session = peg.compiler.Session;
type Pass = ( ast: {}, session: Session, options: {} ) => void;
type StageMap = { [string]: { [string]: Pass } };
type PassMap = { [string]: Pass[] };
```
The PEG.js compiler runs each `Pass` on the `PassMap` (the `passes` option on it's 2nd
argument), but the compiler api ex... | processOptions | javascript | pegjs/pegjs | packages/pegjs/lib/util/index.js | https://github.com/pegjs/pegjs/blob/master/packages/pegjs/lib/util/index.js | MIT |
stringEscape( s ) {
return sourceEscape(
s
.replace( /\\/g, "\\\\" ) // backslash
.replace( /"/g, "\\\"" ), // closing double quote
);
} | ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a string
literal except for the closing quote character, backslash, carriage
return, line separator, paragraph separator, and line feed. Any character
may appear in the form of an escape sequence.
For portability, we also escape all control and non-ASCII... | stringEscape | javascript | pegjs/pegjs | packages/pegjs/lib/util/js.js | https://github.com/pegjs/pegjs/blob/master/packages/pegjs/lib/util/js.js | MIT |
regexpEscape( s ) {
return sourceEscape(
s
.replace( /\\/g, "\\\\" ) // backslash
.replace( /\//g, "\\/" ) // closing slash
.replace( /]/g, "\\]" ) // closing bracket
.replace( /\^/g, "\\^" ) // caret
.repla... | Based on ECMA-262, 5th ed., 7.8.5 & 15.10.1.
For portability, we also escape all control and non-ASCII characters. | regexpEscape | javascript | pegjs/pegjs | packages/pegjs/lib/util/js.js | https://github.com/pegjs/pegjs/blob/master/packages/pegjs/lib/util/js.js | MIT |
function evalModule( source, context ) {
const argumentKeys = Object.keys( context );
const argumentValues = argumentKeys.map( argument => context[ argument ] );
const sandbox = { exports: {} };
argumentKeys.push( "module", "exports", source );
argumentValues.push( sandbox, sandbox.exports );
... | `eval` the given source as a CommonJS module, using properties found in `context` as top-level variables.
Based on `vm.runInContext` found in Node.js, this is a cross-env solution. | evalModule | javascript | pegjs/pegjs | packages/pegjs/lib/util/vm.js | https://github.com/pegjs/pegjs/blob/master/packages/pegjs/lib/util/vm.js | MIT |
function target( { banner, entry, library, minimize, name, output } ) {
const cwd = process.cwd();
const plugins = [];
if ( typeof banner === "string" ) {
banner = dedent( banner );
plugins.push( new webpack.BannerPlugin( { banner, raw: true } ) );
}
return {
name,
... | A wrapper function to help create a configuration for Webpack.
@param {{banner?: string, entry: string, library: string, minimize?: boolean, name?: string, output: string}} param0
@returns {{}} | target | javascript | pegjs/pegjs | tools/bundler/target.js | https://github.com/pegjs/pegjs/blob/master/tools/bundler/target.js | MIT |
copy( source, target, opts ) {
return refresh( source, target, async () => {
if ( FRESH_BUILD ) await fse.remove( target );
await fse.copy( source, target, opts );
} );
} | A conveniant object that has the following merged:
- The `fs-extra-plus` module
- The `path` module
- Custom overwrides of the above 2 modules
@type {path & fse} | copy | javascript | pegjs/pegjs | website/export.utils.js | https://github.com/pegjs/pegjs/blob/master/website/export.utils.js | MIT |
load() {
const { argv } = process;
return require( argv[ argv.indexOf( Bundler.argv ) + 1 ] )[ Bundler.property ];
} | This method must be called from a bundler's `*.js` config file to get the actual config. | load | javascript | pegjs/pegjs | website/export.utils.js | https://github.com/pegjs/pegjs/blob/master/website/export.utils.js | MIT |
create( { check, config, cwd = __dirname, next, script, targets } ) {
if ( targets && ! config ) config = targets[ 0 ];
/** @returns {Promise<T>} */
async function executer() {
const run = () => cp.run( "node", [ Bundler.cli, Bundler.argv, script ], { cwd } );
await ... | This will create an async function that first executes the bundler if required, then calls `next`
@template T
@param {{check?: string, config: {}, cwd?: string, next: () => T, script: string, targets?: {}[]}} param0 | create | javascript | pegjs/pegjs | website/export.utils.js | https://github.com/pegjs/pegjs/blob/master/website/export.utils.js | MIT |
function expand( p = ".", cwd = [ __dirname, ".." ] ) {
let resolved = expand.cache[ p ];
if ( ! resolved ) {
if ( typeof cwd === "string" ) cwd = [ cwd ];
const right = p
.replace( "\\", "/" )
.split( "/" );
resolved = path.join( ...cwd, ...right );
... | Helps to cleanly get the full filesystem path of `p`.
@param {string} p The path to expand
@param {string|string[]} cwd The current working directory (prepended to `p`) | expand | javascript | pegjs/pegjs | website/export.utils.js | https://github.com/pegjs/pegjs/blob/master/website/export.utils.js | MIT |
async function refresh( source, target, cb ) {
const paths = { source, target };
return FRESH_BUILD || await isSourceNewer( paths )
? cb( paths )
: Promise.resolve();
} | Will execute `cb` if `source` is newer then `target`. Can be used to only build changed files.
_NOTE:_ If the `--fresh` flag is defined, this will always call `cb`
@template T
@param {string} source The source file or directory
@param {string} target The generated output
@param {(paths:{ source:string, target:string ... | refresh | javascript | pegjs/pegjs | website/export.utils.js | https://github.com/pegjs/pegjs/blob/master/website/export.utils.js | MIT |
async function joinMonster(resolveInfo, context, dbCall, options = {}) {
// we need to read the query AST and build a new "SQL AST" from which the SQL and
const sqlAST = queryAST.queryASTToSqlAST(resolveInfo, options, context)
const { sql, shapeDefinition } = await compileSqlAST(sqlAST, context, options)
if (!s... | Takes the GraphQL resolveInfo and returns a hydrated Object with the data.
@param {Object} resolveInfo - Contains the parsed GraphQL query, schema definition, and more. Obtained from the fourth argument to the resolver.
@param {Object} context - An arbitrary object that gets passed to the `where` function. Useful for c... | joinMonster | javascript | join-monster/join-monster | src/index.js | https://github.com/join-monster/join-monster/blob/master/src/index.js | MIT |
async function getNode(
typeName,
resolveInfo,
context,
condition,
dbCall,
options = {},
) {
// get the GraphQL type from the schema using the name
const type = resolveInfo.schema._typeMap[typeName]
assert(type, `Type "${typeName}" not found in your schema.`)
assert(
getConfigFromSchemaObject(ty... | A helper for resolving the Node type in Relay.
@param {String} typeName - The Name of the GraphQLObjectType
@param {Object} resolveInfo - Contains the parsed GraphQL query, schema definition, and more. Obtained from the fourth argument to the resolver.
@param {Object} context - An arbitrary object that gets passed to t... | getNode | javascript | join-monster/join-monster | src/index.js | https://github.com/join-monster/join-monster/blob/master/src/index.js | MIT |
isMergeableObject = function isMergeableObject(value) {
return isNonNullObject(value)
&& !isSpecial(value)
} | By https://github.com/TehShrike/deepmerge | isMergeableObject | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
function isNonNullObject(value) {
return !!value && typeof value === 'object'
} | By https://github.com/TehShrike/deepmerge | isNonNullObject | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
function isSpecial(value) {
var stringValue = Object.prototype.toString.call(value)
return stringValue === '[object RegExp]'
|| stringValue === '[object Date]'
|| isNode(value)
|| isReactElement(value)
} | By https://github.com/TehShrike/deepmerge | isSpecial | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
function isReactElement(value) {
return value.$$typeof === REACT_ELEMENT_TYPE
} | By https://github.com/TehShrike/deepmerge | isReactElement | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
function isNode(value) {
return value instanceof Node
} | By https://github.com/TehShrike/deepmerge | isNode | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
function emptyTarget(val) {
return Array.isArray(val) ? [] : {}
} | By https://github.com/TehShrike/deepmerge | emptyTarget | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
function cloneUnlessOtherwiseSpecified(value, options) {
return (options.clone !== false && options.isMergeableObject(value))
? deepmerge(emptyTarget(value), value, options)
: value
} | By https://github.com/TehShrike/deepmerge | cloneUnlessOtherwiseSpecified | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
function defaultArrayMerge(target, source, options) {
return target.concat(source).map(function(element) {
return cloneUnlessOtherwiseSpecified(element, options)
})
} | By https://github.com/TehShrike/deepmerge | defaultArrayMerge | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
function getMergeFunction(key, options) {
if (!options.customMerge) {
return deepmerge
}
var customMerge = options.customMerge(key)
return typeof customMerge === 'function' ? customMerge : deepmerge
} | By https://github.com/TehShrike/deepmerge | getMergeFunction | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
function getEnumerableOwnPropertySymbols(target) {
return Object.getOwnPropertySymbols
? Object.getOwnPropertySymbols(target).filter(function(symbol) {
return target.propertyIsEnumerable(symbol)
})
: []
} | By https://github.com/TehShrike/deepmerge | getEnumerableOwnPropertySymbols | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
function getKeys(target) {
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
} | By https://github.com/TehShrike/deepmerge | getKeys | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
function propertyIsOnObject(object, property) {
try {
return property in object
} catch(_) {
return false
}
} | By https://github.com/TehShrike/deepmerge | propertyIsOnObject | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
function propertyIsUnsafe(target, key) {
return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe i... | By https://github.com/TehShrike/deepmerge | propertyIsUnsafe | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
function mergeObject(target, source, options) {
var destination = {}
if (options.isMergeableObject(target)) {
getKeys(target).forEach(function(key) {
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options)
})
}
getKeys(source).forEach(function(key) {
if (propertyIsUnsafe(target, key)) {
r... | By https://github.com/TehShrike/deepmerge | mergeObject | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
deepmerge = function (target, source, options) {
options = options || {}
options.arrayMerge = options.arrayMerge || defaultArrayMerge
options.isMergeableObject = options.isMergeableObject || isMergeableObject
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
// implementations can ... | By https://github.com/TehShrike/deepmerge | deepmerge | javascript | themustafaomar/jsvectormap | packages/jsvectormap/src/js/util/deepMerge.js | https://github.com/themustafaomar/jsvectormap/blob/master/packages/jsvectormap/src/js/util/deepMerge.js | MIT |
function bunker(fn) {
try {
fn();
} catch (e) {
if (!PRODUCTION) {
throw e;
}
}
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | bunker | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true,
});
} else {
obj[key] = value;
}
return obj;
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _defineProperty | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === "function") {
ownKeys = ownKeys.concat(
Object.getOwnPropertySymbol... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _objectSpread | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function defineIcons(prefix, icons) {
var params =
arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var _params$skipHooks = params.skipHooks,
skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks;
var normalized = Object.keys(icons).reduce(function (acc, ico... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | defineIcons | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function bunker(fn) {
try {
fn();
} catch (e) {
if (!PRODUCTION) {
throw e;
}
}
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | bunker | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true,
});
} else {
obj[key] = value;
}
return obj;
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _defineProperty | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === "function") {
ownKeys = ownKeys.concat(
Object.getOwnPropertySymbol... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _objectSpread | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function defineIcons(prefix, icons) {
var params =
arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var _params$skipHooks = params.skipHooks,
skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks;
var normalized = Object.keys(icons).reduce(function (acc, ico... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | defineIcons | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _typeof(obj) {
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
};
} else {
_typeof = function (obj) {
return obj &&
typeof Symbol === "function" &&
obj.constructor === Symbol &... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _typeof | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _classCallCheck | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, d... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _defineProperties | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _createClass | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true,
});
} else {
obj[key] = value;
}
return obj;
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _defineProperty | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === "function") {
ownKeys = ownKeys.concat(
Object.getOwnPropertySymbol... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _objectSpread | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _slicedToArray(arr, i) {
return (
_arrayWithHoles(arr) ||
_iterableToArrayLimit(arr, i) ||
_nonIterableRest()
);
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _slicedToArray | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _toConsumableArray(arr) {
return (
_arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread()
);
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _toConsumableArray | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++)
arr2[i] = arr[i];
return arr2;
}
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _arrayWithoutHoles | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _arrayWithHoles | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _iterableToArray(iter) {
if (
Symbol.iterator in Object(iter) ||
Object.prototype.toString.call(iter) === "[object Arguments]"
)
return Array.from(iter);
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _iterableToArray | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _iterableToArrayLimit(arr, i) {
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (
var _i = arr[Symbol.iterator](), _s;
!(_n = (_s = _i.next()).done);
_n = true
) {
_arr.push(_s.value);
if (i && _arr.length ===... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _iterableToArrayLimit | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance");
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _nonIterableSpread | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | _nonIterableRest | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function getAttrConfig(attr) {
var element = DOCUMENT.querySelector("script[" + attr + "]");
if (element) {
return element.getAttribute(attr);
}
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | getAttrConfig | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function coerce(val) {
// Getting an empty string will occur if the attribute is set on the HTML tag but without a value
// We'll assume that this is an indication that it should be toggled to true
// For example <script data-search-pseudo-elements src="..."></script>
if (val === "") return true;
if... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | coerce | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
listener = function listener() {
DOCUMENT.removeEventListener("DOMContentLoaded", listener);
loaded = 1;
functions.map(function (fn) {
return fn();
});
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | listener | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function domready(fn) {
if (!IS_DOM) return;
loaded ? setTimeout(fn, 0) : functions.push(fn);
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | domready | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function asyncFlush() {
// run promise callbacks
for (var i = 0; i < asyncQueue.length; i++) {
asyncQueue[i][0](asyncQueue[i][1]);
} // reset async asyncQueue
asyncQueue = [];
asyncTimer = false;
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | asyncFlush | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function asyncCall(callback, arg) {
asyncQueue.push([callback, arg]);
if (!asyncTimer) {
asyncTimer = true;
asyncSetTimer(asyncFlush, 0);
}
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | asyncCall | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function invokeResolver(resolver, promise) {
function resolvePromise(value) {
resolve(promise, value);
}
function rejectPromise(reason) {
reject(promise, reason);
}
try {
resolver(resolvePromise, rejectPromise);
} catch (e) {
rejectPromise(e);
}
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | invokeResolver | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function resolvePromise(value) {
resolve(promise, value);
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | resolvePromise | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function rejectPromise(reason) {
reject(promise, reason);
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | rejectPromise | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function invokeCallback(subscriber) {
var owner = subscriber.owner;
var settled = owner._state;
var value = owner._data;
var callback = subscriber[settled];
var promise = subscriber.then;
if (typeof callback === "function") {
settled = FULFILLED;
try {
value = callback(valu... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | invokeCallback | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function handleThenable(promise, value) {
var resolved;
try {
if (promise === value) {
throw new TypeError(
"A promises callback cannot return that same promise."
);
}
if (
value &&
(typeof value === "function" || _typeof(value) === "object")
)... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | handleThenable | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function resolve(promise, value) {
if (promise === value || !handleThenable(promise, value)) {
fulfill(promise, value);
}
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | resolve | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function fulfill(promise, value) {
if (promise._state === PENDING) {
promise._state = SETTLED;
promise._data = value;
asyncCall(publishFulfillment, promise);
}
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | fulfill | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function reject(promise, reason) {
if (promise._state === PENDING) {
promise._state = SETTLED;
promise._data = reason;
asyncCall(publishRejection, promise);
}
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | reject | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function publish(promise) {
promise._then = promise._then.forEach(invokeCallback);
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | publish | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function publishFulfillment(promise) {
promise._state = FULFILLED;
publish(promise);
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | publishFulfillment | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function publishRejection(promise) {
promise._state = REJECTED;
publish(promise);
if (!promise._handled && isNode) {
global.process.emit("unhandledRejection", promise._data, promise);
}
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | publishRejection | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function notifyRejectionHandled(promise) {
global.process.emit("rejectionHandled", promise);
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | notifyRejectionHandled | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
bindInternal4 = function bindInternal4(func, thisContext) {
return function (a, b, c, d) {
return func.call(thisContext, a, b, c, d);
};
} | Internal helper to bind a function known to have 4 arguments
to a given context. | bindInternal4 | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
reduce = function fastReduceObject(
subject,
fn,
initialValue,
thisContext
) {
var keys = Object.keys(subject),
length = keys.length,
iterator =
thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,
i,
key,
result;
if (initialValue === undefine... | # Reduce
A fast object `.reduce()` implementation.
@param {Object} subject The object to reduce over.
@param {Function} fn The reducer function.
@param {mixed} initialValue The initial value for the reducer, defaults to subject[0].
@param {Object} thisContext The context for the reducer.
@r... | reduce | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function toHex(unicode) {
var result = "";
for (var i = 0; i < unicode.length; i++) {
var hex = unicode.charCodeAt(i).toString(16);
result += ("000" + hex).slice(-4);
}
return result;
} | # Reduce
A fast object `.reduce()` implementation.
@param {Object} subject The object to reduce over.
@param {Function} fn The reducer function.
@param {mixed} initialValue The initial value for the reducer, defaults to subject[0].
@param {Object} thisContext The context for the reducer.
@r... | toHex | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function defineIcons(prefix, icons) {
var params =
arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var _params$skipHooks = params.skipHooks,
skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks;
var normalized = Object.keys(icons).reduce(function (acc, ico... | # Reduce
A fast object `.reduce()` implementation.
@param {Object} subject The object to reduce over.
@param {Function} fn The reducer function.
@param {mixed} initialValue The initial value for the reducer, defaults to subject[0].
@param {Object} thisContext The context for the reducer.
@r... | defineIcons | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
build = function build() {
var lookup = function lookup(reducer) {
return reduce(
styles,
function (o, style, prefix) {
o[prefix] = reduce(style, reducer, {});
return o;
},
{}
);
};
_byUnicode = lookup(function (acc, icon, iconName) {
if... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | build | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
lookup = function lookup(reducer) {
return reduce(
styles,
function (o, style, prefix) {
o[prefix] = reduce(style, reducer, {});
return o;
},
{}
);
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | lookup | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function byUnicode(prefix, unicode) {
return (_byUnicode[prefix] || {})[unicode];
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | byUnicode | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function byLigature(prefix, ligature) {
return (_byLigature[prefix] || {})[ligature];
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | byLigature | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function byOldName(name) {
return (
_byOldName[name] || {
prefix: null,
iconName: null,
}
);
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | byOldName | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
emptyCanonicalIcon = function emptyCanonicalIcon() {
return {
prefix: null,
iconName: null,
rest: [],
};
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | emptyCanonicalIcon | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function getCanonicalIcon(values) {
return values.reduce(function (acc, cls) {
var iconName = getIconName(config.familyPrefix, cls);
if (styles$1[cls]) {
acc.prefix = cls;
} else if (
config.autoFetchSvg &&
["fas", "far", "fal", "fad", "fab", "fa"].indexOf(cls) > -1
... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | getCanonicalIcon | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function iconFromMapping(mapping, prefix, iconName) {
if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
return {
prefix: prefix,
iconName: iconName,
icon: mapping[prefix][iconName],
};
}
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | iconFromMapping | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function toHtml(abstractNodes) {
var tag = abstractNodes.tag,
_abstractNodes$attrib = abstractNodes.attributes,
attributes =
_abstractNodes$attrib === void 0 ? {} : _abstractNodes$attrib,
_abstractNodes$childr = abstractNodes.children,
children = _abstractNodes$childr === void 0 ? []... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | toHtml | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function isWatched(node) {
var i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;
return typeof i2svg === "string";
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | isWatched | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function getMutator() {
if (config.autoReplaceSvg === true) {
return mutators.replace;
}
var mutator = mutators[config.autoReplaceSvg];
return mutator || mutators.replace;
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | getMutator | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function perform(mutations, callback) {
var callbackFunction = typeof callback === "function" ? callback : noop$2;
if (mutations.length === 0) {
callbackFunction();
} else {
var frame = performOperationSync;
if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {
frame = WINDOW.... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | perform | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function disableObservation() {
disabled = true;
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | disableObservation | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function enableObservation() {
disabled = false;
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | enableObservation | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function observe(options) {
if (!MUTATION_OBSERVER) {
return;
}
if (!config.observeMutations) {
return;
}
var treeCallback = options.treeCallback,
nodeCallback = options.nodeCallback,
pseudoElementsCallback = options.pseudoElementsCallback,
_options$observeMutat = opt... | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | observe | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
function disconnect() {
if (!mo) return;
mo.disconnect();
} | Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
of new styles we needed to differentiate between them. Prefix `fa` is now an alias
for `fas` so we'll easy the upgrade process for our users by automatically defining
this as well. | disconnect | javascript | ashutosh1919/masterPortfolio | src/assets/font-awesome/js/all.js | https://github.com/ashutosh1919/masterPortfolio/blob/master/src/assets/font-awesome/js/all.js | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.