blob: 5a0a0caa8d1ffa2644f4611a57eb69ad4252be90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/*!
* is-dotfile <https://github.com/regexps/is-dotfile>
*
* Copyright (c) 2015 Jon Schlinkert, contributors.
* Licensed under the MIT license.
*/
module.exports = function(str) {
if (str.charCodeAt(0) === 46 /* . */ && str.indexOf('/', 1) === -1) {
return true;
}
var last = str.lastIndexOf('/');
return last !== -1 ? str.charCodeAt(last + 1) === 46 /* . */ : false;
};
|