Download pool/shard000/JavaScript/0000052_abs.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 634 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard000/JavaScript/0000052_abs.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard000/JavaScript/0000052_abs.js
-
curl -L -o 0000052_abs.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard000/JavaScript/0000052_abs.js
634 Bytes
| module.exports = { | |
| name: "abs", | |
| ns: "math", | |
| description: "Computes the absolute value of a number.", | |
| phrases: { | |
| active: "Computing absolute value for {input.x}" | |
| }, | |
| ports: { | |
| input: { | |
| x: { | |
| title: "Number", | |
| type: "number", | |
| required: true | |
| } | |
| }, | |
| output: { | |
| out: { | |
| title: "out", | |
| type: "number" | |
| } | |
| } | |
| }, | |
| fn: function abs(input, $, output, state, done, cb, on) { | |
| var r = function() { | |
| output.out = $.create(Math.abs($.x)) | |
| }.call(this); | |
| return { | |
| output: output, | |
| state: state, | |
| on: on, | |
| return: r | |
| }; | |
| } | |
| } |