Snippet format update
To match the starter (for the migration)
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
### untildify
|
||||
---
|
||||
title: untildify
|
||||
tags: node,string,beginner
|
||||
---
|
||||
|
||||
Converts a tilde path to an absolute path.
|
||||
|
||||
@ -10,4 +13,4 @@ const untildify = str => str.replace(/^~($|\/|\\)/, `${require('os').homedir()}$
|
||||
|
||||
```js
|
||||
untildify('~/node'); // '/Users/aUser/node'
|
||||
```
|
||||
```
|
||||
Reference in New Issue
Block a user