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

font-picker

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

font-picker - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

lib/font-picker.js.map

21

lib/font-picker.js

@@ -174,3 +174,3 @@ (function (global, factory) {

*/
function filterList(fontList, activeFont, options) {
function filterList(fontList, defaultFont, options) {
var filteredList = fontList;

@@ -204,9 +204,2 @@

// Add default font to beginning of list if it is not already in it
if (filteredList.filter(function (font) {
return font.family === activeFont.family;
}).length === 0) {
filteredList.unshift(activeFont);
}
// 'limit' parameter (limit font list size)

@@ -217,2 +210,14 @@ if (options.limit) {

// Add default font to list if it is not already in it
if (filteredList.filter(function (font) {
return font.family === defaultFont.family;
}).length === 0) {
// Add default font to beginning of list
filteredList.unshift(defaultFont);
// Remove least popular font from list if limit parameter is set
if (options.limit) {
filteredList.pop();
}
}
// 'sort' parameter (list is already sorted by popularity)

@@ -219,0 +224,0 @@ if (options.sort === 'alphabetical') {

{
"name": "font-picker",
"version": "2.0.5",
"version": "2.0.6",
"description": "Font selector component for Google Fonts",

@@ -29,3 +29,3 @@ "keywords": [

"devDependencies": {
"autoprefixer": "^8.6.5",
"autoprefixer": "^9.1.2",
"babel-core": "^6.26.3",

@@ -36,11 +36,11 @@ "babel-plugin-external-helpers": "^6.22.0",

"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-import": "^2.14.0",
"husky": "^0.14.3",
"node-sass": "^4.9.2",
"node-sass": "^4.9.3",
"npm-run-all": "^4.1.3",
"postcss": "^6.0.23",
"rollup": "^0.62.0",
"postcss": "^7.0.2",
"rollup": "^0.64.1",
"rollup-plugin-babel": "^3.0.7",
"rollup-plugin-postcss": "^1.6.2",
"serve": "^9.2.0"
"serve": "^9.6.0"
},

@@ -47,0 +47,0 @@ "files": [

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