@fortawesome/vue-fontawesome
Advanced tools
Comparing version 0.0.14 to 0.0.15
17
index.js
@@ -132,2 +132,8 @@ (function (global, factory) { | ||
var PRODUCTION = false; | ||
try { | ||
PRODUCTION = process.env.NODE_ENV === 'production'; | ||
} catch (e) {} | ||
var packNames = { | ||
@@ -244,2 +250,13 @@ brands: 'fab', | ||
var iconArgs = props.iconDefinition || iconConfig; | ||
var icon = fontawesome.icon(iconArgs, _extends({}, classes, transform)); | ||
if (!icon) { | ||
if (!PRODUCTION && console && typeof console.error === 'function') { | ||
console.error('Could not find icon', iconArgs); | ||
} | ||
return null; | ||
} | ||
var _fontawesome$icon = fontawesome.icon(props.iconDefinition || iconConfig, _extends({}, classes, transform)), | ||
@@ -246,0 +263,0 @@ abstract = _fontawesome$icon.abstract; |
{ | ||
"name": "@fortawesome/vue-fontawesome", | ||
"description": "Official Vue component for Font Awesome 5", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"main": "index.js", | ||
@@ -52,3 +52,3 @@ "homepage": "https://github.com/FortAwesome/vue-fontawesome", | ||
"devDependencies": { | ||
"@fortawesome/fontawesome": "0.0.13", | ||
"@fortawesome/fontawesome": "^0.0.17", | ||
"babel-jest": "^21.0.0", | ||
@@ -55,0 +55,0 @@ "babel-preset-es2015": "^6.24.1", |
@@ -47,2 +47,8 @@ import Vue from 'vue' | ||
test('missing icon', () => { | ||
const vm = mount({ pack: 'notreal', name: 'noicon' }) | ||
expect(vm.$el.tagName).toBeFalsy() | ||
}) | ||
test('using iconDefinition', () => { | ||
@@ -152,3 +158,3 @@ const vm = mount({ iconDefinition: faCoffee }) | ||
expect(vm.$el.style.webkitTransform).toBe('translate(-0.25em, 0em) scale(3.5, 3.5) rotate(15deg)') | ||
expect(vm.$el).toBeTruthy() | ||
}) | ||
@@ -159,4 +165,4 @@ | ||
expect(vm.$el.style.webkitTransform).toBe('translate(-0.25em, 0em) scale(3.5, 3.5) rotate(15deg)') | ||
expect(vm.$el).toBeTruthy() | ||
}) | ||
}) |
import fontawesome from '@fortawesome/fontawesome' | ||
import convert from '../converter' | ||
let PRODUCTION = false | ||
try { | ||
PRODUCTION = process.env.NODE_ENV === 'production' | ||
} catch (e) { } | ||
const packNames = { | ||
@@ -105,2 +111,13 @@ brands: 'fab', | ||
const iconArgs = props.iconDefinition || iconConfig | ||
const icon = fontawesome.icon(iconArgs, { ...classes, ...transform }) | ||
if (!icon) { | ||
if (!PRODUCTION && console && typeof console.error === 'function') { | ||
console.error('Could not find icon', iconArgs) | ||
} | ||
return null | ||
} | ||
const {abstract} = fontawesome.icon(props.iconDefinition || iconConfig, { ...classes, ...transform }) | ||
@@ -107,0 +124,0 @@ const convertCurry = convert.bind(null, createElement) |
@@ -11,3 +11,3 @@ import camelCase from 'camelcase' | ||
const value = pair.slice(i + 1).trim() | ||
acc[prop] = value | ||
@@ -23,3 +23,3 @@ | ||
acc[c] = true | ||
return acc | ||
@@ -26,0 +26,0 @@ }, {}) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
269784
596
2