wallet-core/node_modules/is-dotfile/index.js

15 lines
391 B
JavaScript
Raw Normal View History

2016-10-10 03:43:44 +02:00
/*!
2017-08-14 05:01:11 +02:00
* is-dotfile <https://github.com/jonschlinkert/is-dotfile>
2016-10-10 03:43:44 +02:00
*
2017-08-14 05:01:11 +02:00
* Copyright (c) 2015-2017, Jon Schlinkert.
* Released under the MIT License.
2016-10-10 03:43:44 +02:00
*/
module.exports = function(str) {
if (str.charCodeAt(0) === 46 /* . */ && str.indexOf('/', 1) === -1) {
return true;
}
2017-08-14 05:01:11 +02:00
var slash = str.lastIndexOf('/');
return slash !== -1 ? str.charCodeAt(slash + 1) === 46 /* . */ : false;
2016-10-10 03:43:44 +02:00
};