checkonline

0.3.0 • Public • Published

checkonline

NPM version Build Status Coverage Status NPM downloads

Check if spm package is online.


Install

$ npm install checkonline

Usage

var checkonline = require('checkonline');
checkonline({
  cwd: process.cwd(),
  server: 'https://a.alipayobjects.com'
}, function(err, files) {
  console.log('online: %s', files
    .filter(function(f){return f.isOnline})
    .map(function(f){return f.filepath;})
  );
});

Options

  • cwd, path to package
  • withDeps, also check dependencies of this package
  • statusCode, the response should return this status code
  • server, cdn server to serve assets

File Object

  • filepath
  • isOnline

LISENCE

Copyright (c) 2014 chencheng. Licensed under the MIT license.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.3.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.3.0
    2
  • 0.2.0
    2
  • 0.1.0
    2

Package Sidebar

Install

npm i checkonline

Weekly Downloads

6

Version

0.3.0

License

MIT

Last publish

Collaborators

  • sorrycc