meownica-web-fonts-loader
Advanced tools
Comparing version 1.1.1 to 1.2.0
/* global XMLHttpRequest, document */ | ||
export default (url, addClassOnLoad) => { | ||
export default (url, addClassOnLoad, cb) => { | ||
const xhr = new XMLHttpRequest() | ||
@@ -11,2 +11,3 @@ xhr.open('GET', url, true) | ||
if (addClassOnLoad) document.documentElement.className += ' ' + addClassOnLoad | ||
if (cb && typeof cb === 'function') cb(xhr) | ||
} | ||
@@ -13,0 +14,0 @@ } |
{ | ||
"name": "meownica-web-fonts-loader", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "An asynchronous web-font loader based on code by meowni.ca", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"test": "make test && mocha-phantomjs -R dot build/test/index.html", | ||
"lint": "standard", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post", | ||
"commitmsg": "validate-commit-msg", | ||
"precommit": "npm run lint && npm test" | ||
}, | ||
@@ -26,4 +28,13 @@ "repository": { | ||
"devDependencies": { | ||
"babel-cli": "^6.18.0", | ||
"babel-preset-env": "^1.0.2", | ||
"babel-preset-es2015": "^6.18.0", | ||
"babelify": "^7.3.0", | ||
"browserify": "^13.1.1", | ||
"husky": "^0.11.9", | ||
"mocha": "^3.2.0", | ||
"mocha-phantomjs": "^4.1.0", | ||
"semantic-release": "^6.3.2", | ||
"standard": "^8.6.0" | ||
"standard": "^8.6.0", | ||
"validate-commit-msg": "^2.8.2" | ||
}, | ||
@@ -41,3 +52,8 @@ "browserify": { | ||
] | ||
}, | ||
"standard": { | ||
"ignore": [ | ||
"/build" | ||
] | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
5660
10
44
1
11