UNPKG
units
Version:
latest (5.3.0)
5.3.0
5.2.0
5.1.0
5.0.0
4.0.0
3.0.2
3.0.1
3.0.0
2.2.1
2.2.0
2.1.0
2.0.1
2.0.0
1.2.0
1.1.0
1.0.0
0.0.2
Module-like system with two-step initialization
github.com/velocityzen/units
velocityzen/units
units
/
proxy_handler.js
10 lines
(8 loc)
•
170 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
module
.
exports
= {
get
:
(
target, prop
) =>
{
if
(prop.
slice
(-
1
) ===
'?'
) {
return
target.
get
(prop.
slice
(
0
, -
1
)); }
return
target.
require
(prop); } }