0.3.0 • Published 10 years ago

checkonline v0.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

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.