Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
Replace path
node v0.12.18
version:
2.0.0
endpoint
share
tweet
var string = 'path/deep-path/data.yaml'; var path = require('path'); console.log(string.replace('/\//g', '\\')); console.log(string.replace('/\//g',path.sep));
Loading…
no comments
sign in
to comment