{"action":"created","issue":{"url":"https://api.github.com/repos/es128/glob-parent/issues/3","labels_url":"https://api.github.com/repos/es128/glob-parent/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/es128/glob-parent/issues/3/comments","events_url":"https://api.github.com/repos/es128/glob-parent/issues/3/events","html_url":"https://github.com/es128/glob-parent/issues/3","id":105462780,"number":3,"title":"Doesn't return the correct base from non-globby strings","user":{"login":"robwierzbowski","id":925735,"avatar_url":"https://avatars.githubusercontent.com/u/925735?v=3","gravatar_id":"","url":"https://api.github.com/users/robwierzbowski","html_url":"https://github.com/robwierzbowski","followers_url":"https://api.github.com/users/robwierzbowski/followers","following_url":"https://api.github.com/users/robwierzbowski/following{/other_user}","gists_url":"https://api.github.com/users/robwierzbowski/gists{/gist_id}","starred_url":"https://api.github.com/users/robwierzbowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robwierzbowski/subscriptions","organizations_url":"https://api.github.com/users/robwierzbowski/orgs","repos_url":"https://api.github.com/users/robwierzbowski/repos","events_url":"https://api.github.com/users/robwierzbowski/events{/privacy}","received_events_url":"https://api.github.com/users/robwierzbowski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-08T20:28:50Z","updated_at":"2015-09-08T21:07:00Z","closed_at":null,"body":"Given the string `'foo/bar/baz/file.txt'`:\r\n\r\n- glob2base returns `'foo/bar/baz'`\r\n- glob-parent returns `'foo/bar/baz/file.txt'`\r\n\r\nFor complete parity you might want to fix. I want to use glob-parent; not having to add conditionals based on `glob.hasMagic` and `extension !== ''` would make it a more pleasant experience.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/es128/glob-parent/issues/comments/138699881","html_url":"https://github.com/es128/glob-parent/issues/3#issuecomment-138699881","issue_url":"https://api.github.com/repos/es128/glob-parent/issues/3","id":138699881,"user":{"login":"robwierzbowski","id":925735,"avatar_url":"https://avatars.githubusercontent.com/u/925735?v=3","gravatar_id":"","url":"https://api.github.com/users/robwierzbowski","html_url":"https://github.com/robwierzbowski","followers_url":"https://api.github.com/users/robwierzbowski/followers","following_url":"https://api.github.com/users/robwierzbowski/following{/other_user}","gists_url":"https://api.github.com/users/robwierzbowski/gists{/gist_id}","starred_url":"https://api.github.com/users/robwierzbowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robwierzbowski/subscriptions","organizations_url":"https://api.github.com/users/robwierzbowski/orgs","repos_url":"https://api.github.com/users/robwierzbowski/repos","events_url":"https://api.github.com/users/robwierzbowski/events{/privacy}","received_events_url":"https://api.github.com/users/robwierzbowski/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T21:07:00Z","updated_at":"2015-09-08T21:07:00Z","body":"In my project I need some special attention to directory paths; sorry that\npart of the example was superfluous. Please disregard.\n\nI've been following the discussions on other repos about replacing\nglob2base with glob-parent. If the module is suggested as a replacement\nthere should be output parity between the two.\n\nIf a string of directories returns the equivalent of basename, why wouldn't\na string that ends in a file name? It seems to me that they should both\nreturn the entire string, or both return basename. I could understand use\ncases for both, depending on the focus of the module.\n\nInterested in any normalization you decide on.\n\nOn Tuesday, September 8, 2015, Elan Shanker <notifications@github.com>\nwrote:\n\n> Given the string 'foo/bar/baz', glob2base returns 'foo/bar', so extension\n> !== '' isn't actually going to help you.\n>\n> Regarding your suggestion, perhaps, but the intention was to strip off\n> glob stuff in order to provide paths that could be used directly in fs\n> methods, not to create a version of path.dirname() with glob sensitivity.\n> This also wasn't created for the sake of competing with or replacing\n> glob2base, so parity with it hasn't been a goal.\n>\n> The question I'd like to answer (hopefully in a way that isn't just\n> arbitrary or based upon another lib's choices) is whether it is better or\n> more consistent to ensure the return value is always a parent dir\n> regardless of glob magic.\n>\n> @jonschlinkert <https://github.com/jonschlinkert> would be interested in\n> your opinion on this\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/es128/glob-parent/issues/3#issuecomment-138694685>.\n>\n\n\n-- \nRob Wierzbowski\n@robwierzbowski <http://twitter.com/#!/robwierzbowski>\nhttp://github.com/robwierzbowski\nhttp://robwierzbowski.com\n"}}