You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using an array as custom transformations doesn't work as expected #124
it considers the array as an object and replace number with the value at the index of the array;
it mutates the array and starts adding properties to it.
Here is a test case:
vargetSlug=require('speakingurl');constcustom=['b'];constslug=getSlug('0',{ custom });console.log(slug);// => 'b', '0' has been replaced with the custom char at index 0console.log(custom);// => [ 'b', b: 'b' ] the array has been mutated and now have a `b` property
Activity
david-benes commentedon Feb 11, 2021
There are more examples of this issue:
fix pid#124; deal with custom transformations correctly