UNPKG
@baseplate-dev/sync
Version:
latest (0.3.8)
0.3.8
0.3.7
0.3.6
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.6
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.3
0.1.2
0.1.1
Library for syncing Baseplate descriptions
www.baseplate.dev
halfdomelabs/baseplate
@baseplate-dev/sync
/
dist
/
utils
/
make-id-safe.js
10 lines
•
250 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
/** * Makes string safe for use as an identifier * *
@param
str
- The string to make safe *
@returns
The safe string */
export
function
makeIdSafe
(
str
) {
return
str.
replaceAll
(
/[^a-zA-Z0-9]/g
,
'_'
); }
//# sourceMappingURL=make-id-safe.js.map