We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On windows file listing having double slash on object return list. Is there any way to avoid it ?
.normalise() is not working on this case.
.normalise()
Currently using.
Object.replaceAll = function (entity, needle, replacement, affectsKeys, affectsValues) { affectsKeys = typeof affectsKeys === "undefined" ? true : affectsKeys; affectsValues = typeof affectsValues === "undefined" ? true : affectsValues; var newEntity = {}, regExp = new RegExp( needle, 'g' ); for( var property in entity ) { if( !entity.hasOwnProperty( property ) ) { continue; } var value = entity[property], newProperty = property; if( affectsKeys ) { newProperty = property.replace( regExp, replacement ); } if( affectsValues ) { if( typeof value === "object" ) { value = Object.replaceAll( value, needle, replacement, affectsKeys, affectsValues ); } else if( typeof value === "string" ) { value = value.replace( regExp, replacement ); } } newEntity[newProperty] = value; } return newEntity; };
var replaced = Object.replaceAll( files, /\\/g, "/" );
The text was updated successfully, but these errors were encountered:
No branches or pull requests
On windows file listing having double slash on object return list. Is there any way to avoid it ?
.normalise()
is not working on this case.Currently using.
var replaced = Object.replaceAll( files, /\\/g, "/" );
The text was updated successfully, but these errors were encountered: