Skip to content

Commit 97a413d

Browse files
committed
Removed is_generator function from javascript functions
1 parent 670c38d commit 97a413d

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/javascript/lib/core/functions.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,6 @@ function call_property(item, property){
2929
}
3030
}
3131

32-
function is_generator(fun){
33-
return fun.constructor.name === "GeneratorFunction";
34-
}
35-
36-
function* run(fun, args, context = null){
37-
if(fun.constructor.name === "GeneratorFunction"){
38-
return yield* fun.apply(context, args);
39-
}
40-
41-
return yield fun.apply(context, args);
42-
}
43-
4432
function apply(...args){
4533
if(args.length === 2){
4634
args[0].apply(null, args.slice(1));
@@ -406,7 +394,6 @@ function maps_from_list(list){
406394

407395
export default {
408396
call_property,
409-
run,
410397
apply,
411398
contains,
412399
get_global,
@@ -443,6 +430,5 @@ export default {
443430
duplicate,
444431
mapfoldl,
445432
filtermap,
446-
maps_fold,
447-
is_generator
433+
maps_fold
448434
};

0 commit comments

Comments
 (0)