{"action":"created","issue":{"url":"https://api.github.com/repos/yanatan16/nanoajax/issues/17","repository_url":"https://api.github.com/repos/yanatan16/nanoajax","labels_url":"https://api.github.com/repos/yanatan16/nanoajax/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/yanatan16/nanoajax/issues/17/comments","events_url":"https://api.github.com/repos/yanatan16/nanoajax/issues/17/events","html_url":"https://github.com/yanatan16/nanoajax/issues/17","id":158736745,"number":17,"title":"Shorter name instead of `nanoajax.ajax`? ","user":{"login":"samayo","id":5304093,"avatar_url":"https://avatars.githubusercontent.com/u/5304093?v=3","gravatar_id":"","url":"https://api.github.com/users/samayo","html_url":"https://github.com/samayo","followers_url":"https://api.github.com/users/samayo/followers","following_url":"https://api.github.com/users/samayo/following{/other_user}","gists_url":"https://api.github.com/users/samayo/gists{/gist_id}","starred_url":"https://api.github.com/users/samayo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samayo/subscriptions","organizations_url":"https://api.github.com/users/samayo/orgs","repos_url":"https://api.github.com/users/samayo/repos","events_url":"https://api.github.com/users/samayo/events{/privacy}","received_events_url":"https://api.github.com/users/samayo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-06T17:56:43Z","updated_at":"2016-06-06T19:29:04Z","closed_at":null,"body":"Hi, I've been using this library for a month now, and I like it as it does what I want. But, I was wandering why the name has to be long `nanoajax.ajax` is 13 characters. Why not just shorten it, or create an alias like `nano` or `nano.ajax` ... sure it's trivial but I can't get past it everytime I have to write `nanoajax.ajax` .. otherwise :+1: "},"comment":{"url":"https://api.github.com/repos/yanatan16/nanoajax/issues/comments/224062296","html_url":"https://github.com/yanatan16/nanoajax/issues/17#issuecomment-224062296","issue_url":"https://api.github.com/repos/yanatan16/nanoajax/issues/17","id":224062296,"user":{"login":"voxpelli","id":34457,"avatar_url":"https://avatars.githubusercontent.com/u/34457?v=3","gravatar_id":"","url":"https://api.github.com/users/voxpelli","html_url":"https://github.com/voxpelli","followers_url":"https://api.github.com/users/voxpelli/followers","following_url":"https://api.github.com/users/voxpelli/following{/other_user}","gists_url":"https://api.github.com/users/voxpelli/gists{/gist_id}","starred_url":"https://api.github.com/users/voxpelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voxpelli/subscriptions","organizations_url":"https://api.github.com/users/voxpelli/orgs","repos_url":"https://api.github.com/users/voxpelli/repos","events_url":"https://api.github.com/users/voxpelli/events{/privacy}","received_events_url":"https://api.github.com/users/voxpelli/received_events","type":"User","site_admin":false},"created_at":"2016-06-06T19:29:04Z","updated_at":"2016-06-06T19:29:04Z","body":"You can always rename it to whatever you want by doing something like:\r\n\r\n```javascript\r\nvar shortajax = nanoajax.ajax.bind(nanoajax);\r\n```\r\n\r\nAnd if you're using browserify, then you can name the library whatever you want when importing it:\r\n\r\n```javascript\r\nvar nano = require('nanoajax');\r\n```\r\n\r\nA global package name should be rather unique to avoid collisions + be descriptive about itself and `nanoajax` achieves both + is used in production code so changing it would probably not be such a good idea.\r\n\r\nAnother similar idea though would be to expose the `nanoajax.ajax()` method on the top module so that it is enough to just do `nanoajax()`. Then it would be easier to rename as well as shorter to access from the start. The change would be as simple as to change the `exports.ajax = ` to:\r\n\r\n```\r\nmodule.exports = ...;\r\nmodule.exports.ajax = module.exports;\r\n```\r\nThen both old API and new shorthand would work."}}
{"actor":{"display_login":"voxpelli"}}