Sha256: 479f889a81d05931f45f06f3eb4c93ff0e958156450eacb987c4aaf35d2b813c
Contents?: true
Size: 421 Bytes
Versions: 66
Compression:
Stored size: 421 Bytes
Contents
'use strict'; /** * ```js * var isRelative = require('is-relative'); * isRelative('README.md'); * //=> true * ``` * * @name isRelative * @param {String} `filepath` Path to test. * @return {Boolean} * @api public */ module.exports = function isRelative(filepath) { if (typeof filepath !== 'string') { throw new Error('isRelative expects a string.'); } return !/^([a-z]+:)?[\\\/]/i.test(filepath); };
Version data entries
66 entries across 66 versions & 3 rubygems