viki-web-utils
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -11,2 +11,3 @@ 'use strict'; | ||
var ResizeCounter = require('./resize_counter/ResizeCounter'); | ||
var BlockedResourceChecker = require('./blocked_checker/BlockedResourceChecker'); | ||
@@ -17,3 +18,4 @@ module.exports = { | ||
LocalStorageTabCounter: LocalStorageTabCounter, | ||
ResizeCounter: ResizeCounter | ||
ResizeCounter: ResizeCounter, | ||
BlockedResourceChecker: BlockedResourceChecker | ||
}; |
{ | ||
"name": "viki-web-utils", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "Utils used by the Viki web app", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -60,2 +60,20 @@ # viki-web-utils | ||
### BlockedResourceChecker | ||
Tests if a resource is blocked on client side. Returns a Promise on test that is passed in `blocked` and `resource` values. | ||
#### Usage | ||
```js | ||
// create checker | ||
const checker = new BlockedResourceChecker('https://badresource.blah'); | ||
// test resource returns a Promise | ||
checker | ||
.test() | ||
.then((res) => { | ||
console.log(res.resource, res.blocked) // https://badresource.blah true | ||
}); | ||
``` | ||
--- | ||
@@ -75,7 +93,9 @@ | ||
Karma wil prompt you to open browser on Google Chrome. To trigger tests, modify and save any src file. | ||
Build and publishing | ||
``` | ||
npm build | ||
npm run build | ||
npm run build-docs // generates JSDoc documentation to /docs dir | ||
npm publish //script automatically builds before publish | ||
``` |
@@ -22,2 +22,6 @@ /* eslint-env jasmine */ | ||
}); | ||
it('should have BlockedResourceChecker', function () { | ||
expect(Viki.BlockedResourceChecker).toEqual(jasmine.any(Function)); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Network access
Supply chain riskThis module accesses the network.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 10 instances in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
100
3
196371
50
2091