UNPKG

dtl-js

Version:

Data Transformation Language - JSON templates and data transformation

609 lines (608 loc) 18 kB
{ "?": { "scope": "DTL", "prefix": "?", "body": "?(${1:condition} ${2:true_expression} ${3:false_expression})", "description": "Snippet for ?" }, "@": { "scope": "DTL", "prefix": "@", "body": "@(${1:[\\$label]} ${2:\\$data_item})", "description": "Snippet for @" }, "&": { "scope": "DTL", "prefix": "&", "body": "&(${1:\\$data_item1} ${2:\\$data_item2} ${3:[\\$data_item3 ...]})", "description": "Snippet for &" }, "empty": { "scope": "DTL", "prefix": "empty", "body": "empty(${1:\\$data_item})", "description": "Snippet for empty" }, "exists": { "scope": "DTL", "prefix": "exists", "body": "exists(${1:\\$data_item})", "description": "Snippet for exists" }, "group": { "scope": "DTL", "prefix": "group", "body": "group(${1:\\$items} ${2:\\$bucket_name_transform} ${3:[\\$value_transform]})", "description": "Snippet for group" }, "explode": { "scope": "DTL", "prefix": "explode", "body": "explode(${1:\\$string})", "description": "Snippet for explode" }, "first": { "scope": "DTL", "prefix": "first", "body": "first(${1:\\$array} ${2:[\\$transform]})", "description": "Snippet for first" }, "grep": { "scope": "DTL", "prefix": "grep", "body": "grep(${1:\\$array_or_object} ${2:\\$search_transform} ${3:[\\$value_transform]} ${4:[\\$extra]})", "description": "Snippet for grep" }, "derive": { "scope": "DTL", "prefix": "derive", "body": "derive(${1:\\$data} ${2:\\$action_map})", "description": "Snippet for derive" }, "chain": { "scope": "DTL", "prefix": "chain", "body": "chain(${1:\\$data} ${2:\\$transform_chain})", "description": "Snippet for chain" }, "fne": { "scope": "DTL", "prefix": "fne", "body": "fne(${1:\\$item1} ${2:\\$item2} ${3:\\$item3} ${4:...})", "description": "Snippet for fne" }, "now": { "scope": "DTL", "prefix": "now", "body": "now(${1:\\$seconds_only})", "description": "Snippet for now" }, "strftime": { "scope": "DTL", "prefix": "strftime", "body": "strftime(${1:\\$time_format} ${2:\\$time_since_epoch} ${3:[\\$timezone]})", "description": "Snippet for strftime" }, "random_string": { "scope": "DTL", "prefix": "random_string", "body": "random_string(${1:\\$template} ${2:[\\$charmap]})", "description": "Snippet for random_string" }, "keys": { "scope": "DTL", "prefix": "keys", "body": "keys(${1:\\$object})", "description": "Snippet for keys" }, "length": { "scope": "DTL", "prefix": "length", "body": "length(${1:\\$item})", "description": "Snippet for length" }, "url_encode": { "scope": "DTL", "prefix": "url_encode", "body": "url_encode(${1:\\$string})", "description": "Snippet for url_encode" }, "url_decode": { "scope": "DTL", "prefix": "url_decode", "body": "url_decode(${1:\\$encoded_string})", "description": "Snippet for url_decode" }, "escape": { "scope": "DTL", "prefix": "escape", "body": "escape(${1:\\$string} ${2:[\\$characters]})", "description": "Snippet for escape" }, "regex": { "scope": "DTL", "prefix": "regex", "body": "regex(${1:\\$pattern} ${2:[\\$flags]})", "description": "Snippet for regex" }, "replace": { "scope": "DTL", "prefix": "replace", "body": "replace(${1:\\$string} ${2:\\$search} ${3:\\$replacement})", "description": "Snippet for replace" }, "match": { "scope": "DTL", "prefix": "match", "body": "match(${1:\\$string} ${2:\\$search})", "description": "Snippet for match" }, "merge_into": { "scope": "DTL", "prefix": "merge_into", "body": "merge_into(${1:\\$object} ${2:\\$keypath} ${3:\\$data})", "description": "Snippet for merge_into" }, "flatten": { "scope": "DTL", "prefix": "flatten", "body": "flatten(${1:\\$array_or_object} ${2:[\\$separator]} ${3:[\\$prefix]})", "description": "Snippet for flatten" }, "unflatten": { "scope": "DTL", "prefix": "unflatten", "body": "unflatten(${1:\\$object} ${2:[\\$separator]})", "description": "Snippet for unflatten" }, "sort_by": { "scope": "DTL", "prefix": "sort_by", "body": "sort_by(${1:\\$array} ${2:\\$extractor})", "description": "Snippet for sort_by" }, "sort": { "scope": "DTL", "prefix": "sort", "body": "sort(${1:\\$array} ${2:\\$comparison})", "description": "Snippet for sort" }, "reverse": { "scope": "DTL", "prefix": "reverse", "body": "reverse(${1:\\$array_or_string})", "description": "Snippet for reverse" }, "split": { "scope": "DTL", "prefix": "split", "body": "split(${1:\\$string} ${2:\\$regexp})", "description": "Snippet for split" }, "join": { "scope": "DTL", "prefix": "join", "body": "join(${1:\\$array} ${2:\\$separator})", "description": "Snippet for join" }, "substr": { "scope": "DTL", "prefix": "substr", "body": "substr(${1:\\$string} ${2:\\$start} ${3:\\$end})", "description": "Snippet for substr" }, "typeof": { "scope": "DTL", "prefix": "typeof", "body": "typeof(${1:\\$thing})", "description": "Snippet for typeof" }, "uuid": { "scope": "DTL", "prefix": "uuid", "body": "uuid(${1:[\\$version]} ${2:[\\$name]} ${3:[\\$namespace]})", "description": "Snippet for uuid" }, "transform": { "scope": "DTL", "prefix": "transform", "body": "transform(${1:\\$input} ${2:\\$transform_or_expression})", "description": "Snippet for transform" }, "values": { "scope": "DTL", "prefix": "values", "body": "values(${1:\\$object})", "description": "Snippet for values" }, "lc": { "scope": "DTL", "prefix": "lc", "body": "lc(${1:\\$string})", "description": "Snippet for lc" }, "uc": { "scope": "DTL", "prefix": "uc", "body": "uc(${1:\\$string})", "description": "Snippet for uc" }, "capitalize": { "scope": "DTL", "prefix": "capitalize", "body": "capitalize(${1:\\$string})", "description": "Snippet for capitalize" }, "sprintf": { "scope": "DTL", "prefix": "sprintf", "body": "sprintf(${1:\\$formatstring} ${2:[\\$args...]})", "description": "Snippet for sprintf" }, "tofixed": { "scope": "DTL", "prefix": "tofixed", "body": "tofixed(${1:\\$number} ${2:\\$precision} ${3:\\$as_string})", "description": "Snippet for tofixed" }, "bignumber_clean": { "scope": "DTL", "prefix": "bignumber_clean", "body": "bignumber_clean(${1:\\$thing} ${2:\\$use_strings})", "description": "Snippet for bignumber_clean" }, "from_json": { "scope": "DTL", "prefix": "from_json", "body": "from_json(${1:\\$json_string})", "description": "Snippet for from_json" }, "to_json": { "scope": "DTL", "prefix": "to_json", "body": "to_json(${1:\\$value_or_object} ${2:\\$pretty} ${3:\\$preserve_undefined} ${4:\\$bignumbers_as_strings})", "description": "Snippet for to_json" }, "repeat": { "scope": "DTL", "prefix": "repeat", "body": "repeat(${1:number_of_iterations} ${2:\\$input_data} ${3:main_transform} ${4:[break_transform]})", "description": "Snippet for repeat" }, "segment": { "scope": "DTL", "prefix": "segment", "body": "segment(${1:\\$array} ${2:[\\$group_size \\$start \\$end]})", "description": "Snippet for segment" }, "head": { "scope": "DTL", "prefix": "head", "body": "head(${1:\\$array} ${2:\\$n})", "description": "Snippet for head" }, "tail": { "scope": "DTL", "prefix": "tail", "body": "tail(${1:\\$array} ${2:\\$n})", "description": "Snippet for tail" }, "extract": { "scope": "DTL", "prefix": "extract", "body": "extract(${1:\\$input_data} ${2:[keys to extract]})", "description": "Snippet for extract" }, "pairs": { "scope": "DTL", "prefix": "pairs", "body": "pairs(${1:\\$object})", "description": "Snippet for pairs" }, "map": { "scope": "DTL", "prefix": "map", "body": "map(${1:\\$input_data} ${2:\\$transform} ${3:[\\$extra]})", "description": "Snippet for map" }, "reduce": { "scope": "DTL", "prefix": "reduce", "body": "reduce(${1:\\$input_data} ${2:\\$transform} ${3:[\\$memo]})", "description": "Snippet for reduce" }, "intersection": { "scope": "DTL", "prefix": "intersection", "body": "intersection(${1:\\$list_a} ${2:\\$list_b})", "description": "Snippet for intersection" }, "union": { "scope": "DTL", "prefix": "union", "body": "union(${1:\\$list_a} ${2:\\$list_b})", "description": "Snippet for union" }, "difference": { "scope": "DTL", "prefix": "difference", "body": "difference(${1:\\$list_a} ${2:\\$list_b})", "description": "Snippet for difference" }, "member": { "scope": "DTL", "prefix": "member", "body": "member(${1:\\$list} ${2:\\$item})", "description": "Snippet for member" }, "subset": { "scope": "DTL", "prefix": "subset", "body": "subset(${1:\\$list_a} ${2:\\$list_b})", "description": "Snippet for subset" }, "math.abs": { "scope": "DTL", "prefix": "math.abs", "body": "math.abs(${1:\\$number})", "description": "Snippet for math.abs" }, "math.acos": { "scope": "DTL", "prefix": "math.acos", "body": "math.acos(${1:\\$number})", "description": "Snippet for math.acos" }, "math.acosh": { "scope": "DTL", "prefix": "math.acosh", "body": "math.acosh(${1:\\$number})", "description": "Snippet for math.acosh" }, "math.asin": { "scope": "DTL", "prefix": "math.asin", "body": "math.asin(${1:\\$number})", "description": "Snippet for math.asin" }, "math.asinh": { "scope": "DTL", "prefix": "math.asinh", "body": "math.asinh(${1:\\$number})", "description": "Snippet for math.asinh" }, "math.atan": { "scope": "DTL", "prefix": "math.atan", "body": "math.atan(${1:\\$number})", "description": "Snippet for math.atan" }, "math.atan2": { "scope": "DTL", "prefix": "math.atan2", "body": "math.atan2(${1:\\$x} ${2:\\$y})", "description": "Snippet for math.atan2" }, "math.atanh": { "scope": "DTL", "prefix": "math.atanh", "body": "math.atanh(${1:\\$number})", "description": "Snippet for math.atanh" }, "math.cbrt": { "scope": "DTL", "prefix": "math.cbrt", "body": "math.cbrt(${1:\\$number})", "description": "Snippet for math.cbrt" }, "math.ceil": { "scope": "DTL", "prefix": "math.ceil", "body": "math.ceil(${1:\\$number})", "description": "Snippet for math.ceil" }, "math.clz32": { "scope": "DTL", "prefix": "math.clz32", "body": "math.clz32(${1:\\$number})", "description": "Snippet for math.clz32" }, "math.cos": { "scope": "DTL", "prefix": "math.cos", "body": "math.cos(${1:\\$number})", "description": "Snippet for math.cos" }, "math.cosh": { "scope": "DTL", "prefix": "math.cosh", "body": "math.cosh(${1:\\$number})", "description": "Snippet for math.cosh" }, "math.exp": { "scope": "DTL", "prefix": "math.exp", "body": "math.exp(${1:\\$number})", "description": "Snippet for math.exp" }, "math.expm1": { "scope": "DTL", "prefix": "math.expm1", "body": "math.expm1(${1:\\$number})", "description": "Snippet for math.expm1" }, "math.floor": { "scope": "DTL", "prefix": "math.floor", "body": "math.floor(${1:\\$number})", "description": "Snippet for math.floor" }, "math.fround": { "scope": "DTL", "prefix": "math.fround", "body": "math.fround(${1:\\$number})", "description": "Snippet for math.fround" }, "math.hypot": { "scope": "DTL", "prefix": "math.hypot", "body": "math.hypot(${1:\\$number} ${2:[\\$number...]})", "description": "Snippet for math.hypot" }, "math.imul": { "scope": "DTL", "prefix": "math.imul", "body": "math.imul(${1:\\$a} ${2:\\$b})", "description": "Snippet for math.imul" }, "math.log": { "scope": "DTL", "prefix": "math.log", "body": "math.log(${1:\\$number})", "description": "Snippet for math.log" }, "math.log10": { "scope": "DTL", "prefix": "math.log10", "body": "math.log10(${1:\\$number})", "description": "Snippet for math.log10" }, "math.log1p": { "scope": "DTL", "prefix": "math.log1p", "body": "math.log1p(${1:\\$number})", "description": "Snippet for math.log1p" }, "math.log2": { "scope": "DTL", "prefix": "math.log2", "body": "math.log2(${1:\\$number})", "description": "Snippet for math.log2" }, "math.max": { "scope": "DTL", "prefix": "math.max", "body": "math.max(${1:\\$array_of_numbers})", "description": "Snippet for math.max" }, "math.min": { "scope": "DTL", "prefix": "math.min", "body": "math.min(${1:\\$array_of_numbers})", "description": "Snippet for math.min" }, "math.pow": { "scope": "DTL", "prefix": "math.pow", "body": "math.pow(${1:\\$x} ${2:\\$y})", "description": "Snippet for math.pow" }, "math.rand": { "scope": "DTL", "prefix": "math.rand", "body": "math.rand(${1:\\$max})", "description": "Snippet for math.rand" }, "math.random": { "scope": "DTL", "prefix": "math.random", "body": "math.random()", "description": "Snippet for math.random" }, "math.round": { "scope": "DTL", "prefix": "math.round", "body": "math.round(${1:\\$number})", "description": "Snippet for math.round" }, "math.sign": { "scope": "DTL", "prefix": "math.sign", "body": "math.sign(${1:\\$number})", "description": "Snippet for math.sign" }, "math.sin": { "scope": "DTL", "prefix": "math.sin", "body": "math.sin(${1:\\$number})", "description": "Snippet for math.sin" }, "math.sinh": { "scope": "DTL", "prefix": "math.sinh", "body": "math.sinh(${1:\\$number})", "description": "Snippet for math.sinh" }, "math.sqrt": { "scope": "DTL", "prefix": "math.sqrt", "body": "math.sqrt(${1:\\$number})", "description": "Snippet for math.sqrt" }, "math.tan": { "scope": "DTL", "prefix": "math.tan", "body": "math.tan(${1:\\$number})", "description": "Snippet for math.tan" }, "math.tanh": { "scope": "DTL", "prefix": "math.tanh", "body": "math.tanh(${1:\\$number})", "description": "Snippet for math.tanh" }, "math.trunc": { "scope": "DTL", "prefix": "math.trunc", "body": "math.trunc(${1:\\$number})", "description": "Snippet for math.trunc" }, "math.E": { "scope": "DTL", "prefix": "math.E", "body": "math.E()", "description": "Snippet for math.E" }, "math.LN10": { "scope": "DTL", "prefix": "math.LN10", "body": "math.LN10()", "description": "Snippet for math.LN10" }, "math.LN2": { "scope": "DTL", "prefix": "math.LN2", "body": "math.LN2()", "description": "Snippet for math.LN2" }, "math.LOG10E": { "scope": "DTL", "prefix": "math.LOG10E", "body": "math.LOG10E()", "description": "Snippet for math.LOG10E" }, "math.LOG2E": { "scope": "DTL", "prefix": "math.LOG2E", "body": "math.LOG2E()", "description": "Snippet for math.LOG2E" }, "math.PI": { "scope": "DTL", "prefix": "math.PI", "body": "math.PI()", "description": "Snippet for math.PI" }, "math.SQRT1_2": { "scope": "DTL", "prefix": "math.SQRT1_2", "body": "math.SQRT1_2()", "description": "Snippet for math.SQRT1_2" }, "math.SQRT2": { "scope": "DTL", "prefix": "math.SQRT2", "body": "math.SQRT2()", "description": "Snippet for math.SQRT2" } }