We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Replace prefix of string using object.
const objectReplacePrefix = require('@extra-string/object-replace-prefix'); // objectReplacePrefix(<string>, <object>, [max prefix length]) objectReplacePrefix('dishonoured', {'dis': '', 'un': '', 'in': ''}); // 'honoured' objectReplacePrefix('dishonoured', {'honour': 'respect', 'flatter': 'mock'}); // 'dishonoured' (only prefix) objectReplacePrefix('dishonoured', {'dis': 'redis', 'redis': 'super'}, 5); // 'redishonoured' (only once)