All pastes #745367 Raw Edit

function description

public javascript v1 · immutable
·published 2007-10-22 10:40 UTC
rendered paste body
func = {    '|': {        description: 'OR operator',        sign: '$@\\(|$@\\)\\+', // $@ is used for functions which have Infinity arguments        args: {            title: null, // title of $@ arguments            type: 'Any', // type of $@ arguments             items: []        },        ret: 'Boolean',        tags: ['Operators']    },    'pi': {        description: 'Math PI function',        sign: 'pi()',        args: {            title: null,            type: null,            items: []        },        ret: 'Number',        tags: ['Math']    },    '[.:.]': {        description: 'Extract a substring (left, right)',        sign: '$1.[$2:$3]',        args: {            title: null,            type: null,            items: [                {                    title: 'source',                    type: 'String'                },                 {                    title: 'start',                    type: 'Number'                },                {                    title: 'end',                    type: 'Number'                }            ]        },        ret: 'String',        tags: ['String functions']    },    'substr': {        description: 'Extract a substring (left, size)',        sign: '$1.substr($2\\(,$3\\)\\?)',        args: {            title: null,            type: null,            items: [                {                    title: 'source',                    type: 'String'                },                 {                    title: 'left',                    type: 'Number'                },                {                    title: 'size',                    type: 'Number'                }            ]        },        ret: 'String',        tags: ['String functions']    }}