diff --git a/bower.json b/bower.json index 7ee99dc..1378164 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "is-hidden", "main": "is-hidden.js", - "description": "Check if `filePath` is hidden (starts with a dot)", + "description": "Check if `filename` is hidden (starts with a dot)", "license": "MIT", "keywords": [ "file", diff --git a/component.json b/component.json index 2b65e6a..298329d 100644 --- a/component.json +++ b/component.json @@ -1,7 +1,7 @@ { "name": "is-hidden", "version": "1.0.0", - "description": "Check if `filePath` is hidden (starts with a dot)", + "description": "Check if `filename` is hidden (starts with a dot)", "license": "MIT", "keywords": [ "file", diff --git a/index.js b/index.js index db89086..267694e 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ * @copyright 2014-2015 Titus Wormer * @license MIT * @module is-hidden - * @fileoverview Check if `filePath` is hidden (starts with a dot). + * @fileoverview Check if `filename` is hidden (starts with a dot). */ 'use strict'; @@ -11,18 +11,18 @@ /* eslint-env commonjs */ /** - * Check if `filePath` is hidden (starts with a dot). + * Check if `filename` is hidden (starts with a dot). * - * @param {string} filePath - File-path to check. - * @return {boolean} - Whether `filePath` is hidden. - * @throws {Error} - When `filePath` is not a string. + * @param {string} filename - File-path to check. + * @return {boolean} - Whether `filename` is hidden. + * @throws {Error} - When `filename` is not a string. */ -function isHidden(filePath) { - if (typeof filePath !== 'string') { +function isHidden(filename) { + if (typeof filename !== 'string') { throw new Error('Expected string'); } - return filePath.charAt(0) === '.'; + return filename.charAt(0) === '.'; } module.exports = isHidden; diff --git a/is-hidden.js b/is-hidden.js index cf35d8c..1a3622c 100644 --- a/is-hidden.js +++ b/is-hidden.js @@ -4,7 +4,7 @@ * @copyright 2014-2015 Titus Wormer * @license MIT * @module is-hidden - * @fileoverview Check if `filePath` is hidden (starts with a dot). + * @fileoverview Check if `filename` is hidden (starts with a dot). */ 'use strict'; @@ -12,18 +12,18 @@ /* eslint-env commonjs */ /** - * Check if `filePath` is hidden (starts with a dot). + * Check if `filename` is hidden (starts with a dot). * - * @param {string} filePath - File-path to check. - * @return {boolean} - Whether `filePath` is hidden. - * @throws {Error} - When `filePath` is not a string. + * @param {string} filename - File-path to check. + * @return {boolean} - Whether `filename` is hidden. + * @throws {Error} - When `filename` is not a string. */ -function isHidden(filePath) { - if (typeof filePath !== 'string') { +function isHidden(filename) { + if (typeof filename !== 'string') { throw new Error('Expected string'); } - return filePath.charAt(0) === '.'; + return filename.charAt(0) === '.'; } module.exports = isHidden; diff --git a/package.json b/package.json index adb4e56..0dc6124 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "is-hidden", "version": "1.0.0", - "description": "Check if `filePath` is hidden (starts with a dot)", + "description": "Check if `filename` is hidden (starts with a dot)", "license": "MIT", "keywords": [ "file", diff --git a/readme.md b/readme.md index 52b390e..eaebfdc 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # is-hidden [![Build Status](https://img.shields.io/travis/wooorm/is-hidden.svg?style=flat)](https://travis-ci.org/wooorm/is-hidden) [![Coverage Status](https://img.shields.io/coveralls/wooorm/is-hidden.svg?style=flat)](https://coveralls.io/r/wooorm/is-hidden?branch=master) -Check whether `filePath` is hidden (starts with a dot). +Check whether `filename` is hidden (starts with a dot). ## Installation @@ -26,21 +26,21 @@ isHidden('readme.md'); // false ## API -### isHidden(filePath) +### isHidden(filename) -Check whether `filePath` is hidden (starts with a dot). +Check whether `filename` is hidden (starts with a dot). **Parameters** -* `filePath` (`string`) — File-path to check. +* `filename` (`string`) — File-path to check. **Returns** -`boolean` — Whether `filePath` is hidden. +`boolean` — Whether `filename` is hidden. **Throws** -* `Error` — When `filePath` is not a string. +* `Error` — When `filename` is not a string. ## License diff --git a/test.js b/test.js index cb9e96d..edd1bb2 100644 --- a/test.js +++ b/test.js @@ -28,7 +28,7 @@ var throws = assert.throws; * Tests. */ -describe('isHidden(filePath)', function () { +describe('isHidden(filename)', function () { it('should work', function () { equal(isHidden('.git'), true); equal(isHidden('git'), false);