Module: cdn

cdn

Module that provides means to check/search in supported CDNs.
Source:

Members

<static> supportedCdn

List of supported CDNs.
Source:

Methods

<static> detect(name, callback, settings)

Check whether package with the specified name is existent, or make search for the specified string. Data about found packages will be passed into callback as array. If no package is found, empty array will be passed into callback.
Parameters:
Name Type Description
name String Name of the package to check or string to search for.
callback function Function that should be called to process operation's result.
settings Object Operation settings. The following settings are supported (name - type - description):
  • cdn - String - CDN in which check/search should be made: cdnjs or jsdelivr (case-insensitive)
  • caseSensitive - Boolean - Whether case-sensitive check/search should be used
  • partialMatch - Integer - Allow partial matching when checking name: 0 - disallow (by default), 1 - allow at the beginning of matching strings, 2 - allow substring matching
  • search - Boolean - Whether search should be made instead of check
  • limit - Integer - Limit of quantity of results
The only mandatory setting is cdn.
Source:
Copyright (c) 2014 Denis Sikuler
Documentation generated by JSDoc 3.2.2 on Sun Jul 13 2014 23:52:09 GMT+0400 (MSK) using the DocStrap template.