Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fortawesome/fontawesome

Package Overview
Dependencies
Maintainers
3
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fortawesome/fontawesome - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

styles.css

297

index.es.js
/*!
* Font Awesome Free 5.0.0 by @fontawesome - http://fontawesome.com
* Font Awesome Free 5.0.1 by @fontawesome - http://fontawesome.com
* License - http://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)

@@ -232,2 +232,12 @@ */

function classArray(node) {
if (node.classList) {
return toArray(node.classList);
} else {
return (node.getAttribute('class') || '').split(' ').filter(function (i) {
return i;
});
}
}
function getIconName(familyPrefix, cls) {

@@ -557,3 +567,3 @@ var parts = cls.split('-');

var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : { mark: noop$2, measure: noop$2 };
var preamble = 'FA "5.0.0"';
var preamble = 'FA "5.0.1"';

@@ -574,123 +584,2 @@ var begin = function begin(name) {

function toHtml(abstractNodes) {
var tag = abstractNodes.tag,
_abstractNodes$attrib = abstractNodes.attributes,
attributes = _abstractNodes$attrib === undefined ? {} : _abstractNodes$attrib,
_abstractNodes$childr = abstractNodes.children,
children = _abstractNodes$childr === undefined ? [] : _abstractNodes$childr;
if (typeof abstractNodes === 'string') {
return htmlEscape(abstractNodes);
} else {
return '<' + tag + ' ' + joinAttributes(attributes) + '>' + children.map(toHtml).join('') + '</' + tag + '>';
}
}
var noop$1 = function noop() {};
function getMutator() {
if (config.autoReplaceSvg === true) {
return mutators.replace;
}
var mutator = mutators[config.autoReplaceSvg];
return mutator || mutators.replace;
}
var mutators = {
replace: function replace(mutation) {
var node = mutation[0];
var abstract = mutation[1];
var newOuterHTML = abstract.map(function (a) {
return toHtml(a);
}).join('\n');
if (node.parentNode) node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? '<!-- ' + node.outerHTML + ' -->' : '');
},
nest: function nest(mutation) {
var node = mutation[0];
var abstract = mutation[1];
// If we already have a replaced node we do not want to continue nesting within it.
// Short-circuit to the standard replacement
if (~toArray(node.classList).indexOf(config.replacementClass)) {
return mutators.replace(mutation);
}
var forSvg = new RegExp(config.familyPrefix + '-.*');
delete abstract[0].attributes.style;
var splitClasses = abstract[0].attributes.class.split(' ').reduce(function (acc, cls) {
if (cls === config.replacementClass || cls.match(forSvg)) {
acc.toSvg.push(cls);
} else {
acc.toNode.push(cls);
}
return acc;
}, { toNode: [], toSvg: [] });
abstract[0].attributes.class = splitClasses.toSvg.join(' ');
var newInnerHTML = abstract.map(function (a) {
return toHtml(a);
}).join('\n');
node.setAttribute('class', splitClasses.toNode.join(' '));
node.setAttribute(DATA_FA_PROCESSED, '');
node.innerHTML = newInnerHTML;
}
};
function perform(mutations, callback) {
var callbackFunction = typeof callback === 'function' ? callback : noop$1;
if (mutations.length === 0) {
callbackFunction();
} else {
var frame = WINDOW.requestAnimationFrame || function (op) {
return op();
};
frame(function () {
var mutator = getMutator();
var mark = perf.begin('mutate');
mutations.map(mutator);
mark();
callbackFunction();
});
}
}
function disableObservation(operation) {
operation();
}
var styleParser = function (node) {
var style = node.getAttribute('style');
var val = [];
if (style) {
val = style.split(';').reduce(function (acc, style) {
var styles = style.split(':');
var prop = styles[0];
var value = styles.slice(1);
if (prop && value.length > 0) {
acc[prop] = value.join(':').trim();
}
return acc;
}, {});
}
return val;
};
'use strict';

@@ -746,3 +635,3 @@

var styles$1 = namespace.styles;
var styles$2 = namespace.styles;
var shims = namespace.shims;

@@ -757,3 +646,3 @@

var lookup = function lookup(reducer) {
return reduce(styles$1, function (o, style, prefix) {
return reduce(styles$2, function (o, style, prefix) {
o[prefix] = reduce(style, reducer, {});

@@ -782,3 +671,3 @@ return o;

var hasRegular = 'far' in styles$1;
var hasRegular = 'far' in styles$2;

@@ -814,16 +703,5 @@ _byOldName = reduce(shims, function (acc, shim) {

function toHex(unicode) {
var result = '';
var styles$1 = namespace.styles;
for (var i = 0; i < unicode.length; i++) {
var hex = unicode.charCodeAt(i).toString(16);
result += ('000' + hex).slice(-4);
}
return result;
}
var styles$2 = namespace.styles;
var emptyCanonicalIcon = function emptyCanonicalIcon() {

@@ -837,3 +715,3 @@ return { prefix: null, iconName: null, rest: [] };

if (styles$2[cls]) {
if (styles$1[cls]) {
acc.prefix = cls;

@@ -863,2 +741,141 @@ } else if (iconName) {

function toHtml(abstractNodes) {
var tag = abstractNodes.tag,
_abstractNodes$attrib = abstractNodes.attributes,
attributes = _abstractNodes$attrib === undefined ? {} : _abstractNodes$attrib,
_abstractNodes$childr = abstractNodes.children,
children = _abstractNodes$childr === undefined ? [] : _abstractNodes$childr;
if (typeof abstractNodes === 'string') {
return htmlEscape(abstractNodes);
} else {
return '<' + tag + ' ' + joinAttributes(attributes) + '>' + children.map(toHtml).join('') + '</' + tag + '>';
}
}
var noop$1 = function noop() {};
function getMutator() {
if (config.autoReplaceSvg === true) {
return mutators.replace;
}
var mutator = mutators[config.autoReplaceSvg];
return mutator || mutators.replace;
}
var mutators = {
replace: function replace(mutation) {
var node = mutation[0];
var abstract = mutation[1];
var newOuterHTML = abstract.map(function (a) {
return toHtml(a);
}).join('\n');
if (node.parentNode && node.outerHTML) {
node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? '<!-- ' + node.outerHTML + ' -->' : '');
} else if (node.parentNode) {
var newNode = document.createElement('span');
node.parentNode.replaceChild(newNode, node);
newNode.outerHTML = newOuterHTML;
}
},
nest: function nest(mutation) {
var node = mutation[0];
var abstract = mutation[1];
// If we already have a replaced node we do not want to continue nesting within it.
// Short-circuit to the standard replacement
if (~classArray(node).indexOf(config.replacementClass)) {
return mutators.replace(mutation);
}
var forSvg = new RegExp(config.familyPrefix + '-.*');
delete abstract[0].attributes.style;
var splitClasses = abstract[0].attributes.class.split(' ').reduce(function (acc, cls) {
if (cls === config.replacementClass || cls.match(forSvg)) {
acc.toSvg.push(cls);
} else {
acc.toNode.push(cls);
}
return acc;
}, { toNode: [], toSvg: [] });
abstract[0].attributes.class = splitClasses.toSvg.join(' ');
var newInnerHTML = abstract.map(function (a) {
return toHtml(a);
}).join('\n');
node.setAttribute('class', splitClasses.toNode.join(' '));
node.setAttribute(DATA_FA_PROCESSED, '');
node.innerHTML = newInnerHTML;
}
};
function perform(mutations, callback) {
var callbackFunction = typeof callback === 'function' ? callback : noop$1;
if (mutations.length === 0) {
callbackFunction();
} else {
var frame = WINDOW.requestAnimationFrame || function (op) {
return op();
};
frame(function () {
var mutator = getMutator();
var mark = perf.begin('mutate');
mutations.map(mutator);
mark();
callbackFunction();
});
}
}
function disableObservation(operation) {
operation();
}
var styleParser = function (node) {
var style = node.getAttribute('style');
var val = [];
if (style) {
val = style.split(';').reduce(function (acc, style) {
var styles = style.split(':');
var prop = styles[0];
var value = styles.slice(1);
if (prop && value.length > 0) {
acc[prop] = value.join(':').trim();
}
return acc;
}, {});
}
return val;
};
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;
}
var classParser = function (node) {

@@ -869,3 +886,3 @@ var existingPrefix = node.getAttribute('data-prefix');

var val = getCanonicalIcon(toArray(node.classList));
var val = getCanonicalIcon(classArray(node));

@@ -872,0 +889,0 @@ if (existingPrefix && existingIconName) {

/*!
* Font Awesome Free 5.0.0 by @fontawesome - http://fontawesome.com
* Font Awesome Free 5.0.1 by @fontawesome - http://fontawesome.com
* License - http://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)

@@ -238,2 +238,12 @@ */

function classArray(node) {
if (node.classList) {
return toArray(node.classList);
} else {
return (node.getAttribute('class') || '').split(' ').filter(function (i) {
return i;
});
}
}
function getIconName(familyPrefix, cls) {

@@ -563,3 +573,3 @@ var parts = cls.split('-');

var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : { mark: noop$2, measure: noop$2 };
var preamble = 'FA "5.0.0"';
var preamble = 'FA "5.0.1"';

@@ -580,123 +590,2 @@ var begin = function begin(name) {

function toHtml(abstractNodes) {
var tag = abstractNodes.tag,
_abstractNodes$attrib = abstractNodes.attributes,
attributes = _abstractNodes$attrib === undefined ? {} : _abstractNodes$attrib,
_abstractNodes$childr = abstractNodes.children,
children = _abstractNodes$childr === undefined ? [] : _abstractNodes$childr;
if (typeof abstractNodes === 'string') {
return htmlEscape(abstractNodes);
} else {
return '<' + tag + ' ' + joinAttributes(attributes) + '>' + children.map(toHtml).join('') + '</' + tag + '>';
}
}
var noop$1 = function noop() {};
function getMutator() {
if (config.autoReplaceSvg === true) {
return mutators.replace;
}
var mutator = mutators[config.autoReplaceSvg];
return mutator || mutators.replace;
}
var mutators = {
replace: function replace(mutation) {
var node = mutation[0];
var abstract = mutation[1];
var newOuterHTML = abstract.map(function (a) {
return toHtml(a);
}).join('\n');
if (node.parentNode) node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? '<!-- ' + node.outerHTML + ' -->' : '');
},
nest: function nest(mutation) {
var node = mutation[0];
var abstract = mutation[1];
// If we already have a replaced node we do not want to continue nesting within it.
// Short-circuit to the standard replacement
if (~toArray(node.classList).indexOf(config.replacementClass)) {
return mutators.replace(mutation);
}
var forSvg = new RegExp(config.familyPrefix + '-.*');
delete abstract[0].attributes.style;
var splitClasses = abstract[0].attributes.class.split(' ').reduce(function (acc, cls) {
if (cls === config.replacementClass || cls.match(forSvg)) {
acc.toSvg.push(cls);
} else {
acc.toNode.push(cls);
}
return acc;
}, { toNode: [], toSvg: [] });
abstract[0].attributes.class = splitClasses.toSvg.join(' ');
var newInnerHTML = abstract.map(function (a) {
return toHtml(a);
}).join('\n');
node.setAttribute('class', splitClasses.toNode.join(' '));
node.setAttribute(DATA_FA_PROCESSED, '');
node.innerHTML = newInnerHTML;
}
};
function perform(mutations, callback) {
var callbackFunction = typeof callback === 'function' ? callback : noop$1;
if (mutations.length === 0) {
callbackFunction();
} else {
var frame = WINDOW.requestAnimationFrame || function (op) {
return op();
};
frame(function () {
var mutator = getMutator();
var mark = perf.begin('mutate');
mutations.map(mutator);
mark();
callbackFunction();
});
}
}
function disableObservation(operation) {
operation();
}
var styleParser = function (node) {
var style = node.getAttribute('style');
var val = [];
if (style) {
val = style.split(';').reduce(function (acc, style) {
var styles = style.split(':');
var prop = styles[0];
var value = styles.slice(1);
if (prop && value.length > 0) {
acc[prop] = value.join(':').trim();
}
return acc;
}, {});
}
return val;
};
'use strict';

@@ -752,3 +641,3 @@

var styles$1 = namespace.styles;
var styles$2 = namespace.styles;
var shims = namespace.shims;

@@ -763,3 +652,3 @@

var lookup = function lookup(reducer) {
return reduce(styles$1, function (o, style, prefix) {
return reduce(styles$2, function (o, style, prefix) {
o[prefix] = reduce(style, reducer, {});

@@ -788,3 +677,3 @@ return o;

var hasRegular = 'far' in styles$1;
var hasRegular = 'far' in styles$2;

@@ -820,16 +709,5 @@ _byOldName = reduce(shims, function (acc, shim) {

function toHex(unicode) {
var result = '';
var styles$1 = namespace.styles;
for (var i = 0; i < unicode.length; i++) {
var hex = unicode.charCodeAt(i).toString(16);
result += ('000' + hex).slice(-4);
}
return result;
}
var styles$2 = namespace.styles;
var emptyCanonicalIcon = function emptyCanonicalIcon() {

@@ -843,3 +721,3 @@ return { prefix: null, iconName: null, rest: [] };

if (styles$2[cls]) {
if (styles$1[cls]) {
acc.prefix = cls;

@@ -869,2 +747,141 @@ } else if (iconName) {

function toHtml(abstractNodes) {
var tag = abstractNodes.tag,
_abstractNodes$attrib = abstractNodes.attributes,
attributes = _abstractNodes$attrib === undefined ? {} : _abstractNodes$attrib,
_abstractNodes$childr = abstractNodes.children,
children = _abstractNodes$childr === undefined ? [] : _abstractNodes$childr;
if (typeof abstractNodes === 'string') {
return htmlEscape(abstractNodes);
} else {
return '<' + tag + ' ' + joinAttributes(attributes) + '>' + children.map(toHtml).join('') + '</' + tag + '>';
}
}
var noop$1 = function noop() {};
function getMutator() {
if (config.autoReplaceSvg === true) {
return mutators.replace;
}
var mutator = mutators[config.autoReplaceSvg];
return mutator || mutators.replace;
}
var mutators = {
replace: function replace(mutation) {
var node = mutation[0];
var abstract = mutation[1];
var newOuterHTML = abstract.map(function (a) {
return toHtml(a);
}).join('\n');
if (node.parentNode && node.outerHTML) {
node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? '<!-- ' + node.outerHTML + ' -->' : '');
} else if (node.parentNode) {
var newNode = document.createElement('span');
node.parentNode.replaceChild(newNode, node);
newNode.outerHTML = newOuterHTML;
}
},
nest: function nest(mutation) {
var node = mutation[0];
var abstract = mutation[1];
// If we already have a replaced node we do not want to continue nesting within it.
// Short-circuit to the standard replacement
if (~classArray(node).indexOf(config.replacementClass)) {
return mutators.replace(mutation);
}
var forSvg = new RegExp(config.familyPrefix + '-.*');
delete abstract[0].attributes.style;
var splitClasses = abstract[0].attributes.class.split(' ').reduce(function (acc, cls) {
if (cls === config.replacementClass || cls.match(forSvg)) {
acc.toSvg.push(cls);
} else {
acc.toNode.push(cls);
}
return acc;
}, { toNode: [], toSvg: [] });
abstract[0].attributes.class = splitClasses.toSvg.join(' ');
var newInnerHTML = abstract.map(function (a) {
return toHtml(a);
}).join('\n');
node.setAttribute('class', splitClasses.toNode.join(' '));
node.setAttribute(DATA_FA_PROCESSED, '');
node.innerHTML = newInnerHTML;
}
};
function perform(mutations, callback) {
var callbackFunction = typeof callback === 'function' ? callback : noop$1;
if (mutations.length === 0) {
callbackFunction();
} else {
var frame = WINDOW.requestAnimationFrame || function (op) {
return op();
};
frame(function () {
var mutator = getMutator();
var mark = perf.begin('mutate');
mutations.map(mutator);
mark();
callbackFunction();
});
}
}
function disableObservation(operation) {
operation();
}
var styleParser = function (node) {
var style = node.getAttribute('style');
var val = [];
if (style) {
val = style.split(';').reduce(function (acc, style) {
var styles = style.split(':');
var prop = styles[0];
var value = styles.slice(1);
if (prop && value.length > 0) {
acc[prop] = value.join(':').trim();
}
return acc;
}, {});
}
return val;
};
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;
}
var classParser = function (node) {

@@ -875,3 +892,3 @@ var existingPrefix = node.getAttribute('data-prefix');

var val = getCanonicalIcon(toArray(node.classList));
var val = getCanonicalIcon(classArray(node));

@@ -878,0 +895,0 @@ if (existingPrefix && existingIconName) {

{
"description": "The iconic font, CSS, and SVG framework",
"keywords": [
"font",
"awesome",
"fontawesome",
"icon",
"svg",
"bootstrap"
],
"homepage": "https://fontawesome.com",
"bugs": {
"url": "http://github.com/FortAwesome/Font-Awesome/issues"
},
"author": {
"name": "Dave Gandy",
"email": "dave@fontawesome.com",
"web": "http://twitter.com/davegandy"
},
"contributors": [
{
"name": "Brian Talbot",
"web": "http://twitter.com/talbs"
},
{
"name": "Travis Chase",
"web": "http://twitter.com/supercodepoet"
},
{
"name": "Rob Madole",
"web": "http://twitter.com/robmadole"
},
{
"name": "Geremia Taglialatela",
"web": "http://twitter.com/gtagliala"
}
],
"repository": {
"type": "git",
"url": "https://github.com/FortAwesome/Font-Awesome"
},
"engines": {
"node": ">=6"
},
"dependencies": {},
"version": "1.0.1",
"name": "@fortawesome/fontawesome",
"main": "index.js",
"module": "index.es.js",
"repository": "https://github.com/FortAwesome/Font-Awesome-Pro",
"jsnext:main": "index.es.js",
"license": "MIT",
"version": "1.0.0",
"name": "@fortawesome/fontawesome"
"style": "styles.css",
"license": "MIT"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc