UNPKG
electron-kit
Version:
latest (0.3.0)
0.3.0
0.2.1
0.2.0
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.3
0.0.2
0.0.1
Utility kits for middle-scale electron app
electron-kit
/
lib
/
utils
/
deepDelete.js
14 lines
(12 loc)
•
295 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Generated by CoffeeScript 1.10.0
(
function
(
) {
module
.
exports
=
function
(
obj, keyPath
) {
var
paths; paths = keyPath.
split
(
"."
);
if
(paths.
length
>
1
) {
deepDelete
(obj[paths[
0
]], paths.
slice
(
1
).
join
(
"."
)); }
else
{
delete
obj[keyPath]; } }; }).
call
(
this
);