Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jul 15, 2023
1 parent 4133b29 commit ae28d9f
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 8 deletions.
5 changes: 5 additions & 0 deletions code-blocks/data/data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,9 @@ base.fibonacci,"var y = base.fibonacci( 0 )\ny = base.fibonacci( 1 )\ny = base.f
base.fibonacciIndex,"var n = base.fibonacciIndex( 2 )\nn = base.fibonacciIndex( 3 )\nn = base.fibonacciIndex( 5 )\nn = base.fibonacciIndex( NaN )\nn = base.fibonacciIndex( 1 )\n"
base.fibpoly,"var v = base.fibpoly( 5, 2.0 )\n"
base.fibpoly.factory,"var polyval = base.fibpoly.factory( 5 );\nvar v = polyval( 1.0 )\nv = polyval( 2.0 )\n"
base.firstCodePoint,"var out = base.firstCodePoint( 'beep', 1 )\nout = base.firstCodePoint( 'Boop', 1 )\nout = base.firstCodePoint( 'foo bar', 5 )\n"
base.firstCodeUnit,"var out = base.firstCodeUnit( 'beep', 1 )\nout = base.firstCodeUnit( 'Boop', 1 )\nout = base.firstCodeUnit( 'foo bar', 5 )\n"
base.firstGraphemeCluster,"var out = base.firstGraphemeCluster( 'beep', 1 )\nout = base.firstGraphemeCluster( 'Boop', 1 )\nout = base.firstGraphemeCluster( 'foo bar', 5 )\n"
base.flipsign,"var z = base.flipsign( -3.0, 10.0 )\nz = base.flipsign( -3.0, -1.0 )\nz = base.flipsign( 1.0, -0.0 )\nz = base.flipsign( -3.0, -0.0 )\nz = base.flipsign( -0.0, 1.0 )\nz = base.flipsign( 0.0, -1.0 )\n"
base.flipsignf,"var z = base.flipsignf( -3.0, 10.0 )\nz = base.flipsignf( -3.0, -1.0 )\nz = base.flipsignf( 1.0, -0.0 )\nz = base.flipsignf( -3.0, -0.0 )\nz = base.flipsignf( -0.0, 1.0 )\nz = base.flipsignf( 0.0, -1.0 )\n"
base.float32ToInt32,"var y = base.float32ToInt32( base.float64ToFloat32( 4294967295.0 ) )\ny = base.float32ToInt32( base.float64ToFloat32( 3.14 ) )\ny = base.float32ToInt32( base.float64ToFloat32( -3.14 ) )\ny = base.float32ToInt32( base.float64ToFloat32( NaN ) )\ny = base.float32ToInt32( FLOAT32_PINF )\ny = base.float32ToInt32( FLOAT32_NINF )\n"
Expand Down Expand Up @@ -2495,6 +2498,7 @@ filledarray,"var arr = filledarray()\narr = filledarray( 'float32' )\nvar arr =
filledarrayBy,"var arr = filledarrayBy()\narr = filledarrayBy( 'float32' )\nfunction clbk() { return 1.0; };\nvar arr = filledarrayBy( 5, clbk )\narr = filledarrayBy( 5, 'int32', clbk )\nvar arr1 = filledarrayBy( [ 0.5, 0.5, 0.5 ], constantFunction( 2.0 ) )\nvar arr2 = filledarrayBy( arr1, 'float32', constantFunction( 1.0 ) )\nvar arr1 = iterConstant( 3.0, {'iter': 3} );\nvar arr2 = filledarrayBy( arr1, 'float32', constantFunction( 1.0 ) )\nvar buf = new ArrayBuffer( 16 );\nvar arr = filledarrayBy( buf, 0, 4, 'float32', constantFunction( 1.0 ) )\n"
filterArguments,"function foo( a, b ) { return [ a, b ]; };\nfunction predicate( v ) { return ( v !== 2 ); };\nvar bar = filterArguments( foo, predicate );\nvar out = bar( 1, 2, 3 )\n"
find,"var data = [ 30, 20, 50, 60, 10 ];\nfunction condition( val ) { return val > 20; };\nvar vals = find( data, condition )\ndata = [ 30, 20, 50, 60, 10 ];\nvar opts = { 'k': 2, 'returns': 'values' };\nvals = find( data, opts, condition )\ndata = [ 30, 20, 50, 60, 10 ];\nopts = { 'k': -2, 'returns': '*' };\nvals = find( data, opts, condition )\n"
firstChar,"var out = firstChar( 'beep' )\nout = firstChar( 'Boop', 1 )\nout = firstChar( 'foo bar', 5 )\n"
FIVETHIRTYEIGHT_FFQ,"var data = FIVETHIRTYEIGHT_FFQ()\n"
flattenArray,"var arr = [ 1, [ 2, [ 3, [ 4, [ 5 ], 6 ], 7 ], 8 ], 9 ];\nvar out = flattenArray( arr )\narr = [ 1, [ 2, [ 3, [ 4, [ 5 ], 6 ], 7 ], 8 ], 9 ];\nout = flattenArray( arr, { 'depth': 2 } )\nvar bool = ( arr[ 1 ][ 1 ][ 1 ] === out[ 3 ] )\narr = [ 1, [ 2, [ 3, [ 4, [ 5 ], 6 ], 7 ], 8 ], 9 ];\nout = flattenArray( arr, { 'depth': 2, 'copy': true } )\nbool = ( arr[ 1 ][ 1 ][ 1 ] === out[ 3 ] )\n"
flattenArray.factory,"var flatten = flattenArray.factory( [ 2, 2 ], {\n 'copy': false\n });\nvar out = flatten( [ [ 1, 2 ], [ 3, 4 ] ] )\nout = flatten( [ [ 5, 6 ], [ 7, 8 ] ] )\n"
Expand Down Expand Up @@ -2625,6 +2629,7 @@ Float64Array.prototype.values,"var arr = new Float64Array( [ 1.0, -1.0 ] );\nit
forEach,"function logger( v, i ) { console.log( '%s: %d', i, v ); };\nvar arr = [ 1, 2, 3, 4 ];\nforEach( arr, logger )\n"
forEachAsync,"function onDuration( value, next ) {\n setTimeout( onTimeout, value );\n function onTimeout() {\n console.log( value );\n next();\n }\n };\nfunction done( error ) {\n if ( error ) {\n throw error;\n }\n console.log( 'Done.' );\n };\nvar arr = [ 3000, 2500, 1000 ];\nforEachAsync( arr, onDuration, done )\nfunction onDuration( value, next ) {\n setTimeout( onTimeout, value );\n function onTimeout() {\n console.log( value );\n next();\n }\n };\nfunction done( error ) {\n if ( error ) {\n throw error;\n }\n console.log( 'Done.' );\n };\nvar opts = { 'limit': 2 };\nvar arr = [ 3000, 2500, 1000 ];\nforEachAsync( arr, opts, onDuration, done )\nfunction onDuration( value, next ) {\n setTimeout( onTimeout, value );\n function onTimeout() {\n console.log( value );\n next();\n }\n };\nfunction done( error ) {\n if ( error ) {\n throw error;\n }\n console.log( 'Done.' );\n };\nvar opts = { 'series': true };\nvar arr = [ 3000, 2500, 1000 ];\nforEachAsync( arr, opts, onDuration, done )\n"
forEachAsync.factory,"function onDuration( value, next ) {\n setTimeout( onTimeout, value );\n function onTimeout() {\n console.log( value );\n next();\n }\n };\nvar opts = { 'series': true };\nvar f = forEachAsync.factory( opts, onDuration );\nfunction done( error ) {\n if ( error ) {\n throw error;\n }\n console.log( 'Done.' );\n };\nvar arr = [ 3000, 2500, 1000 ];\nf( arr, done )\narr = [ 2000, 1500, 1000 ];\nf( arr, done )\n"
forEachChar,"var n = 0;\nfunction fcn() { n += 1; };\nforEachChar( 'hello world!', fcn );\nn\n"
forEachRight,"function logger( v, i ) { console.log( '%s: %d', i, v ); };\nvar arr = [ 1, 2, 3, 4 ];\nforEachRight( arr, logger )\n"
forEachRightAsync,"function onDuration( value, next ) {\n setTimeout( onTimeout, value );\n function onTimeout() {\n console.log( value );\n next();\n }\n };\nfunction done( error ) {\n if ( error ) {\n throw error;\n }\n console.log( 'Done.' );\n };\nvar arr = [ 1000, 2500, 3000 ];\nforEachRightAsync( arr, onDuration, done )\nfunction onDuration( value, next ) {\n setTimeout( onTimeout, value );\n function onTimeout() {\n console.log( value );\n next();\n }\n };\nfunction done( error ) {\n if ( error ) {\n throw error;\n }\n console.log( 'Done.' );\n };\nvar opts = { 'limit': 2 };\nvar arr = [ 1000, 2500, 3000 ];\nforEachRightAsync( arr, opts, onDuration, done )\nfunction onDuration( value, next ) {\n setTimeout( onTimeout, value );\n function onTimeout() {\n console.log( value );\n next();\n }\n };\nfunction done( error ) {\n if ( error ) {\n throw error;\n }\n console.log( 'Done.' );\n };\nvar opts = { 'series': true };\nvar arr = [ 1000, 2500, 3000 ];\nforEachRightAsync( arr, opts, onDuration, done )\n"
forEachRightAsync.factory,"function onDuration( value, next ) {\n setTimeout( onTimeout, value );\n function onTimeout() {\n console.log( value );\n next();\n }\n };\nvar opts = { 'series': true };\nvar f = forEachRightAsync.factory( opts, onDuration );\nfunction done( error ) {\n if ( error ) {\n throw error;\n }\n console.log( 'Done.' );\n };\nvar arr = [ 1000, 2500, 3000 ];\nf( arr, done )\narr = [ 1000, 1500, 2000 ];\nf( arr, done )\n"
Expand Down
2 changes: 1 addition & 1 deletion code-blocks/data/data.json

Large diffs are not rendered by default.

Loading

0 comments on commit ae28d9f

Please sign in to comment.