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.

Readme

Keywords

none

Package Sidebar

Install

npm i checkonline

Weekly Downloads

2

Version

0.3.0

License

MIT

Last publish

Collaborators

  • sorrycc