{"action":"opened","issue":{"url":"https://api.github.com/repos/pid/speakingurl/issues/124","repository_url":"https://api.github.com/repos/pid/speakingurl","labels_url":"https://api.github.com/repos/pid/speakingurl/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/pid/speakingurl/issues/124/comments","events_url":"https://api.github.com/repos/pid/speakingurl/issues/124/events","html_url":"https://github.com/pid/speakingurl/issues/124","id":365902885,"node_id":"MDU6SXNzdWUzNjU5MDI4ODU=","number":124,"title":"Using an array as custom transformations doesn't work as expected","user":{"login":"atomrc","id":1090716,"node_id":"MDQ6VXNlcjEwOTA3MTY=","avatar_url":"https://avatars3.githubusercontent.com/u/1090716?v=4","gravatar_id":"","url":"https://api.github.com/users/atomrc","html_url":"https://github.com/atomrc","followers_url":"https://api.github.com/users/atomrc/followers","following_url":"https://api.github.com/users/atomrc/following{/other_user}","gists_url":"https://api.github.com/users/atomrc/gists{/gist_id}","starred_url":"https://api.github.com/users/atomrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomrc/subscriptions","organizations_url":"https://api.github.com/users/atomrc/orgs","repos_url":"https://api.github.com/users/atomrc/repos","events_url":"https://api.github.com/users/atomrc/events{/privacy}","received_events_url":"https://api.github.com/users/atomrc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-02T13:40:39Z","updated_at":"2018-10-02T13:40:39Z","closed_at":null,"author_association":"NONE","body":"Hi guys,\r\n\r\nTwo problems:\r\n- it considers the array as an object and replace number with the value at the index of the array;\r\n- it mutates the array and starts adding properties to it.\r\n\r\nHere is a test case:\r\n\r\n```javascript\r\nvar getSlug = require('speakingurl');\r\nconst custom = ['b'];\r\n\r\nconst slug = getSlug('0', { custom });\r\nconsole.log(slug); // => 'b', '0' has been replaced with the custom char at index 0\r\n\r\nconsole.log(custom); // => [ 'b', b: 'b' ] the array has been mutated and now have a `b` property\r\n``` \r\n"}}
{"actor":{"display_login":"atomrc"}}