{"action":"created","comment":{"url":"https://api.github.com/repos/epeli/underscore.string/pulls/comments/29555192","id":29555192,"diff_hunk":"@@ -0,0 +1,55 @@\n+// Wrap\n+// wraps a string by a certain width\n+\n+makeString = require('./helper/makeString');\n+\n+module.exports = function wrap(str, width, seperator, cut){\n+\tstr = makeString(str);\n+\twidth = width || 75;\n+\tseperator = seperator || '\\n';\n+\tcut = cut || false;\n+\tif(width <= 0){\n+\t\treturn str;\n+\t}\n+\telse if(!cut){\n+\t\twords = str.split(\" \");","path":"wrap.js","position":15,"original_position":15,"commit_id":"e7a5804bf7d014a3b245c80fc63c3e6ea0659858","original_commit_id":"e7a5804bf7d014a3b245c80fc63c3e6ea0659858","user":{"login":"stoeffel","id":1217681,"avatar_url":"https://avatars.githubusercontent.com/u/1217681?v=3","gravatar_id":"","url":"https://api.github.com/users/stoeffel","html_url":"https://github.com/stoeffel","followers_url":"https://api.github.com/users/stoeffel/followers","following_url":"https://api.github.com/users/stoeffel/following{/other_user}","gists_url":"https://api.github.com/users/stoeffel/gists{/gist_id}","starred_url":"https://api.github.com/users/stoeffel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoeffel/subscriptions","organizations_url":"https://api.github.com/users/stoeffel/orgs","repos_url":"https://api.github.com/users/stoeffel/repos","events_url":"https://api.github.com/users/stoeffel/events{/privacy}","received_events_url":"https://api.github.com/users/stoeffel/received_events","type":"User","site_admin":false},"body":"How about we use `underscore.string/words' here?","created_at":"2015-05-03T11:19:58Z","updated_at":"2015-05-03T11:19:58Z","html_url":"https://github.com/epeli/underscore.string/pull/410#discussion_r29555192","pull_request_url":"https://api.github.com/repos/epeli/underscore.string/pulls/410","_links":{"self":{"href":"https://api.github.com/repos/epeli/underscore.string/pulls/comments/29555192"},"html":{"href":"https://github.com/epeli/underscore.string/pull/410#discussion_r29555192"},"pull_request":{"href":"https://api.github.com/repos/epeli/underscore.string/pulls/410"}}},"pull_request":{"url":"https://api.github.com/repos/epeli/underscore.string/pulls/410","id":30501115,"html_url":"https://github.com/epeli/underscore.string/pull/410","diff_url":"https://github.com/epeli/underscore.string/pull/410.diff","patch_url":"https://github.com/epeli/underscore.string/pull/410.patch","issue_url":"https://api.github.com/repos/epeli/underscore.string/issues/410","number":410,"state":"open","locked":false,"title":"Add wrap function","user":{"login":"BSteephenson","id":7459695,"avatar_url":"https://avatars.githubusercontent.com/u/7459695?v=3","gravatar_id":"","url":"https://api.github.com/users/BSteephenson","html_url":"https://github.com/BSteephenson","followers_url":"https://api.github.com/users/BSteephenson/followers","following_url":"https://api.github.com/users/BSteephenson/following{/other_user}","gists_url":"https://api.github.com/users/BSteephenson/gists{/gist_id}","starred_url":"https://api.github.com/users/BSteephenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BSteephenson/subscriptions","organizations_url":"https://api.github.com/users/BSteephenson/orgs","repos_url":"https://api.github.com/users/BSteephenson/repos","events_url":"https://api.github.com/users/BSteephenson/events{/privacy}","received_events_url":"https://api.github.com/users/BSteephenson/received_events","type":"User","site_admin":false},"body":"Adds a line wrapping function that limits line length to a certain width\r\nIn response to issue #278 \r\n\r\nLet me know if there's anything more I should do (more tests, documentation, etc). I'm glad to help out.","created_at":"2015-03-04T20:26:13Z","updated_at":"2015-05-03T11:19:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8fa740ab67362a1fce42d4e1557ff8fd8ba23cb1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/epeli/underscore.string/pulls/410/commits","review_comments_url":"https://api.github.com/repos/epeli/underscore.string/pulls/410/comments","review_comment_url":"https://api.github.com/repos/epeli/underscore.string/pulls/comments{/number}","comments_url":"https://api.github.com/repos/epeli/underscore.string/issues/410/comments","statuses_url":"https://api.github.com/repos/epeli/underscore.string/statuses/e7a5804bf7d014a3b245c80fc63c3e6ea0659858","head":{"label":"BSteephenson:master","ref":"master","sha":"e7a5804bf7d014a3b245c80fc63c3e6ea0659858","user":{"login":"BSteephenson","id":7459695,"avatar_url":"https://avatars.githubusercontent.com/u/7459695?v=3","gravatar_id":"","url":"https://api.github.com/users/BSteephenson","html_url":"https://github.com/BSteephenson","followers_url":"https://api.github.com/users/BSteephenson/followers","following_url":"https://api.github.com/users/BSteephenson/following{/other_user}","gists_url":"https://api.github.com/users/BSteephenson/gists{/gist_id}","starred_url":"https://api.github.com/users/BSteephenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BSteephenson/subscriptions","organizations_url":"https://api.github.com/users/BSteephenson/orgs","repos_url":"https://api.github.com/users/BSteephenson/repos","events_url":"https://api.github.com/users/BSteephenson/events{/privacy}","received_events_url":"https://api.github.com/users/BSteephenson/received_events","type":"User","site_admin":false},"repo":{"id":31674274,"name":"underscore.string","full_name":"BSteephenson/underscore.string","owner":{"login":"BSteephenson","id":7459695,"avatar_url":"https://avatars.githubusercontent.com/u/7459695?v=3","gravatar_id":"","url":"https://api.github.com/users/BSteephenson","html_url":"https://github.com/BSteephenson","followers_url":"https://api.github.com/users/BSteephenson/followers","following_url":"https://api.github.com/users/BSteephenson/following{/other_user}","gists_url":"https://api.github.com/users/BSteephenson/gists{/gist_id}","starred_url":"https://api.github.com/users/BSteephenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BSteephenson/subscriptions","organizations_url":"https://api.github.com/users/BSteephenson/orgs","repos_url":"https://api.github.com/users/BSteephenson/repos","events_url":"https://api.github.com/users/BSteephenson/events{/privacy}","received_events_url":"https://api.github.com/users/BSteephenson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BSteephenson/underscore.string","description":"String manipulation helpers for javascript","fork":true,"url":"https://api.github.com/repos/BSteephenson/underscore.string","forks_url":"https://api.github.com/repos/BSteephenson/underscore.string/forks","keys_url":"https://api.github.com/repos/BSteephenson/underscore.string/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BSteephenson/underscore.string/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BSteephenson/underscore.string/teams","hooks_url":"https://api.github.com/repos/BSteephenson/underscore.string/hooks","issue_events_url":"https://api.github.com/repos/BSteephenson/underscore.string/issues/events{/number}","events_url":"https://api.github.com/repos/BSteephenson/underscore.string/events","assignees_url":"https://api.github.com/repos/BSteephenson/underscore.string/assignees{/user}","branches_url":"https://api.github.com/repos/BSteephenson/underscore.string/branches{/branch}","tags_url":"https://api.github.com/repos/BSteephenson/underscore.string/tags","blobs_url":"https://api.github.com/repos/BSteephenson/underscore.string/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BSteephenson/underscore.string/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BSteephenson/underscore.string/git/refs{/sha}","trees_url":"https://api.github.com/repos/BSteephenson/underscore.string/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BSteephenson/underscore.string/statuses/{sha}","languages_url":"https://api.github.com/repos/BSteephenson/underscore.string/languages","stargazers_url":"https://api.github.com/repos/BSteephenson/underscore.string/stargazers","contributors_url":"https://api.github.com/repos/BSteephenson/underscore.string/contributors","subscribers_url":"https://api.github.com/repos/BSteephenson/underscore.string/subscribers","subscription_url":"https://api.github.com/repos/BSteephenson/underscore.string/subscription","commits_url":"https://api.github.com/repos/BSteephenson/underscore.string/commits{/sha}","git_commits_url":"https://api.github.com/repos/BSteephenson/underscore.string/git/commits{/sha}","comments_url":"https://api.github.com/repos/BSteephenson/underscore.string/comments{/number}","issue_comment_url":"https://api.github.com/repos/BSteephenson/underscore.string/issues/comments{/number}","contents_url":"https://api.github.com/repos/BSteephenson/underscore.string/contents/{+path}","compare_url":"https://api.github.com/repos/BSteephenson/underscore.string/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BSteephenson/underscore.string/merges","archive_url":"https://api.github.com/repos/BSteephenson/underscore.string/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BSteephenson/underscore.string/downloads","issues_url":"https://api.github.com/repos/BSteephenson/underscore.string/issues{/number}","pulls_url":"https://api.github.com/repos/BSteephenson/underscore.string/pulls{/number}","milestones_url":"https://api.github.com/repos/BSteephenson/underscore.string/milestones{/number}","notifications_url":"https://api.github.com/repos/BSteephenson/underscore.string/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BSteephenson/underscore.string/labels{/name}","releases_url":"https://api.github.com/repos/BSteephenson/underscore.string/releases{/id}","created_at":"2015-03-04T18:59:58Z","updated_at":"2015-05-02T17:07:21Z","pushed_at":"2015-05-02T17:07:20Z","git_url":"git://github.com/BSteephenson/underscore.string.git","ssh_url":"git@github.com:BSteephenson/underscore.string.git","clone_url":"https://github.com/BSteephenson/underscore.string.git","svn_url":"https://github.com/BSteephenson/underscore.string","homepage":"http://epeli.github.com/underscore.string/","size":3799,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"epeli:master","ref":"master","sha":"09ba69ba0085b1bdb347063236fff2bdfd905d9d","user":{"login":"epeli","id":225712,"avatar_url":"https://avatars.githubusercontent.com/u/225712?v=3","gravatar_id":"","url":"https://api.github.com/users/epeli","html_url":"https://github.com/epeli","followers_url":"https://api.github.com/users/epeli/followers","following_url":"https://api.github.com/users/epeli/following{/other_user}","gists_url":"https://api.github.com/users/epeli/gists{/gist_id}","starred_url":"https://api.github.com/users/epeli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epeli/subscriptions","organizations_url":"https://api.github.com/users/epeli/orgs","repos_url":"https://api.github.com/users/epeli/repos","events_url":"https://api.github.com/users/epeli/events{/privacy}","received_events_url":"https://api.github.com/users/epeli/received_events","type":"User","site_admin":false},"repo":{"id":800115,"name":"underscore.string","full_name":"epeli/underscore.string","owner":{"login":"epeli","id":225712,"avatar_url":"https://avatars.githubusercontent.com/u/225712?v=3","gravatar_id":"","url":"https://api.github.com/users/epeli","html_url":"https://github.com/epeli","followers_url":"https://api.github.com/users/epeli/followers","following_url":"https://api.github.com/users/epeli/following{/other_user}","gists_url":"https://api.github.com/users/epeli/gists{/gist_id}","starred_url":"https://api.github.com/users/epeli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epeli/subscriptions","organizations_url":"https://api.github.com/users/epeli/orgs","repos_url":"https://api.github.com/users/epeli/repos","events_url":"https://api.github.com/users/epeli/events{/privacy}","received_events_url":"https://api.github.com/users/epeli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/epeli/underscore.string","description":"String manipulation helpers for javascript","fork":false,"url":"https://api.github.com/repos/epeli/underscore.string","forks_url":"https://api.github.com/repos/epeli/underscore.string/forks","keys_url":"https://api.github.com/repos/epeli/underscore.string/keys{/key_id}","collaborators_url":"https://api.github.com/repos/epeli/underscore.string/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/epeli/underscore.string/teams","hooks_url":"https://api.github.com/repos/epeli/underscore.string/hooks","issue_events_url":"https://api.github.com/repos/epeli/underscore.string/issues/events{/number}","events_url":"https://api.github.com/repos/epeli/underscore.string/events","assignees_url":"https://api.github.com/repos/epeli/underscore.string/assignees{/user}","branches_url":"https://api.github.com/repos/epeli/underscore.string/branches{/branch}","tags_url":"https://api.github.com/repos/epeli/underscore.string/tags","blobs_url":"https://api.github.com/repos/epeli/underscore.string/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/epeli/underscore.string/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/epeli/underscore.string/git/refs{/sha}","trees_url":"https://api.github.com/repos/epeli/underscore.string/git/trees{/sha}","statuses_url":"https://api.github.com/repos/epeli/underscore.string/statuses/{sha}","languages_url":"https://api.github.com/repos/epeli/underscore.string/languages","stargazers_url":"https://api.github.com/repos/epeli/underscore.string/stargazers","contributors_url":"https://api.github.com/repos/epeli/underscore.string/contributors","subscribers_url":"https://api.github.com/repos/epeli/underscore.string/subscribers","subscription_url":"https://api.github.com/repos/epeli/underscore.string/subscription","commits_url":"https://api.github.com/repos/epeli/underscore.string/commits{/sha}","git_commits_url":"https://api.github.com/repos/epeli/underscore.string/git/commits{/sha}","comments_url":"https://api.github.com/repos/epeli/underscore.string/comments{/number}","issue_comment_url":"https://api.github.com/repos/epeli/underscore.string/issues/comments{/number}","contents_url":"https://api.github.com/repos/epeli/underscore.string/contents/{+path}","compare_url":"https://api.github.com/repos/epeli/underscore.string/compare/{base}...{head}","merges_url":"https://api.github.com/repos/epeli/underscore.string/merges","archive_url":"https://api.github.com/repos/epeli/underscore.string/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/epeli/underscore.string/downloads","issues_url":"https://api.github.com/repos/epeli/underscore.string/issues{/number}","pulls_url":"https://api.github.com/repos/epeli/underscore.string/pulls{/number}","milestones_url":"https://api.github.com/repos/epeli/underscore.string/milestones{/number}","notifications_url":"https://api.github.com/repos/epeli/underscore.string/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/epeli/underscore.string/labels{/name}","releases_url":"https://api.github.com/repos/epeli/underscore.string/releases{/id}","created_at":"2010-07-27T08:01:42Z","updated_at":"2015-05-02T06:19:06Z","pushed_at":"2015-05-02T17:07:20Z","git_url":"git://github.com/epeli/underscore.string.git","ssh_url":"git@github.com:epeli/underscore.string.git","clone_url":"https://github.com/epeli/underscore.string.git","svn_url":"https://github.com/epeli/underscore.string","homepage":"http://epeli.github.com/underscore.string/","size":6414,"stargazers_count":2637,"watchers_count":2637,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":317,"mirror_url":null,"open_issues_count":84,"forks":317,"open_issues":84,"watchers":2637,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/epeli/underscore.string/pulls/410"},"html":{"href":"https://github.com/epeli/underscore.string/pull/410"},"issue":{"href":"https://api.github.com/repos/epeli/underscore.string/issues/410"},"comments":{"href":"https://api.github.com/repos/epeli/underscore.string/issues/410/comments"},"review_comments":{"href":"https://api.github.com/repos/epeli/underscore.string/pulls/410/comments"},"review_comment":{"href":"https://api.github.com/repos/epeli/underscore.string/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/epeli/underscore.string/pulls/410/commits"},"statuses":{"href":"https://api.github.com/repos/epeli/underscore.string/statuses/e7a5804bf7d014a3b245c80fc63c3e6ea0659858"}}}}