Skip to content

Commit

Permalink
feat: add base.forEachChar to namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Jul 15, 2023
1 parent 1389946 commit 775c156
Show file tree
Hide file tree
Showing 27 changed files with 47 additions and 18 deletions.
1 change: 1 addition & 0 deletions lib/node_modules/@stdlib/namespace/alias2pkg/data/data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ base.floorb,"@stdlib/math/base/special/floorb"
base.floorf,"@stdlib/math/base/special/floorf"
base.floorn,"@stdlib/math/base/special/floorn"
base.floorsd,"@stdlib/math/base/special/floorsd"
base.forEachChar,"@stdlib/string/base/for-each"
base.forEachCodePoint,"@stdlib/string/base/for-each-code-point"
base.forEachGraphemeCluster,"@stdlib/string/base/for-each-grapheme-cluster"
base.fresnel,"@stdlib/math/base/special/fresnel"
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,9 @@ base.floorb,"base.ceilb,base.floor,base.floorn,base.roundb"
base.floorf,"base.ceilf,base.floor"
base.floorn,"base.ceiln,base.floor,base.floorb,base.roundn"
base.floorsd,"base.ceilsd,base.floor,base.roundsd,base.truncsd"
base.forEachCodePoint,"base.forEachGraphemeCluster,forEachChar"
base.forEachGraphemeCluster,"base.forEachCodePoint,forEachChar"
base.forEachChar,"base.forEachCodePoint,base.forEachGraphemeCluster,forEachChar"
base.forEachCodePoint,"base.forEachChar,base.forEachGraphemeCluster,forEachChar"
base.forEachGraphemeCluster,"base.forEachChar,base.forEachCodePoint,forEachChar"
base.fresnel,"base.fresnelc,base.fresnels"
base.fresnelc,"base.fresnel,base.fresnels"
base.fresnels,"base.fresnel,base.fresnelc"
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ base.floorb,"@stdlib/math-base-special-floorb"
base.floorf,"@stdlib/math-base-special-floorf"
base.floorn,"@stdlib/math-base-special-floorn"
base.floorsd,"@stdlib/math-base-special-floorsd"
base.forEachChar,"@stdlib/string-base-for-each"
base.forEachCodePoint,"@stdlib/string-base-for-each-code-point"
base.forEachGraphemeCluster,"@stdlib/string-base-for-each-grapheme-cluster"
base.fresnel,"@stdlib/math-base-special-fresnel"
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/namespace/aliases/data/data.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/node_modules/@stdlib/namespace/aliases/data/data.txt
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ base.floorb
base.floorf
base.floorn
base.floorsd
base.forEachChar
base.forEachCodePoint
base.forEachGraphemeCluster
base.fresnel
Expand Down
12 changes: 12 additions & 0 deletions lib/node_modules/@stdlib/namespace/lib/namespace/base/f.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,18 @@ ns.push({
]
});

ns.push({
'alias': 'base.forEachChar',
'path': '@stdlib/string/base/for-each',
'value': require( '@stdlib/string/base/for-each' ),
'type': 'Function',
'related': [
'@stdlib/string/base/for-each-code-point',
'@stdlib/string/base/for-each-grapheme-cluster',
'@stdlib/string/for-each'
]
});

ns.push({
'alias': 'base.forEachCodePoint',
'path': '@stdlib/string/base/for-each-code-point',
Expand Down
1 change: 1 addition & 0 deletions lib/node_modules/@stdlib/namespace/pkg2alias/data/data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@
"@stdlib/math/base/special/floorf",base.floorf
"@stdlib/math/base/special/floorn",base.floorn
"@stdlib/math/base/special/floorsd",base.floorsd
"@stdlib/string/base/for-each",base.forEachChar
"@stdlib/string/base/for-each-code-point",base.forEachCodePoint
"@stdlib/string/base/for-each-grapheme-cluster",base.forEachGraphemeCluster
"@stdlib/math/base/special/fresnel",base.fresnel
Expand Down

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions lib/node_modules/@stdlib/namespace/pkg2related/data/data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,9 @@
"@stdlib/math/base/special/floorf","@stdlib/math/base/special/ceilf,@stdlib/math/base/special/floor"
"@stdlib/math/base/special/floorn","@stdlib/math/base/special/ceiln,@stdlib/math/base/special/floor,@stdlib/math/base/special/floorb,@stdlib/math/base/special/roundn"
"@stdlib/math/base/special/floorsd","@stdlib/math/base/special/ceilsd,@stdlib/math/base/special/floor,@stdlib/math/base/special/roundsd,@stdlib/math/base/special/truncsd"
"@stdlib/string/base/for-each-code-point","@stdlib/string/base/for-each-grapheme-cluster,@stdlib/string/for-each"
"@stdlib/string/base/for-each-grapheme-cluster","@stdlib/string/base/for-each-code-point,@stdlib/string/for-each"
"@stdlib/string/base/for-each","@stdlib/string/base/for-each-code-point,@stdlib/string/base/for-each-grapheme-cluster,@stdlib/string/for-each"
"@stdlib/string/base/for-each-code-point","@stdlib/string/base/for-each,@stdlib/string/base/for-each-grapheme-cluster,@stdlib/string/for-each"
"@stdlib/string/base/for-each-grapheme-cluster","@stdlib/string/base/for-each,@stdlib/string/base/for-each-code-point,@stdlib/string/for-each"
"@stdlib/math/base/special/fresnel","@stdlib/math/base/special/fresnelc,@stdlib/math/base/special/fresnels"
"@stdlib/math/base/special/fresnelc","@stdlib/math/base/special/fresnel,@stdlib/math/base/special/fresnels"
"@stdlib/math/base/special/fresnels","@stdlib/math/base/special/fresnel,@stdlib/math/base/special/fresnelc"
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@
"@stdlib/math/base/special/floorf","@stdlib/math-base-special-floorf"
"@stdlib/math/base/special/floorn","@stdlib/math-base-special-floorn"
"@stdlib/math/base/special/floorsd","@stdlib/math-base-special-floorsd"
"@stdlib/string/base/for-each","@stdlib/string-base-for-each"
"@stdlib/string/base/for-each-code-point","@stdlib/string-base-for-each-code-point"
"@stdlib/string/base/for-each-grapheme-cluster","@stdlib/string-base-for-each-grapheme-cluster"
"@stdlib/math/base/special/fresnel","@stdlib/math-base-special-fresnel"
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@
"@stdlib/math-base-special-floorf","@stdlib/math/base/special/floorf"
"@stdlib/math-base-special-floorn","@stdlib/math/base/special/floorn"
"@stdlib/math-base-special-floorsd","@stdlib/math/base/special/floorsd"
"@stdlib/string-base-for-each","@stdlib/string/base/for-each"
"@stdlib/string-base-for-each-code-point","@stdlib/string/base/for-each-code-point"
"@stdlib/string-base-for-each-grapheme-cluster","@stdlib/string/base/for-each-grapheme-cluster"
"@stdlib/math-base-special-fresnel","@stdlib/math/base/special/fresnel"
Expand Down

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/node_modules/@stdlib/repl/code-blocks/data/data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,8 @@ base.floorb,"var y = base.floorb( 3.14159, -4, 10 )\ny = base.floorb( 3.14159, 0
base.floorf,"var y = base.floorf( 3.14 )\ny = base.floorf( -4.2 )\ny = base.floorf( -4.6 )\ny = base.floorf( 9.5 )\ny = base.floorf( -0.0 )\n"
base.floorn,"var y = base.floorn( 3.14159, -4 )\ny = base.floorn( 3.14159, 0 )\ny = base.floorn( 12368.0, 3 )\n"
base.floorsd,"var y = base.floorsd( 3.14159, 5 )\ny = base.floorsd( 3.14159, 1 )\ny = base.floorsd( 12368.0, 2 )\ny = base.floorsd( 0.0313, 2, 2 )\n"
base.forEachChar,"var n = 0;\nfunction fcn() { n += 1; };\nbase.forEachChar( 'hello world!', fcn );\nn\n"
base.forEachCodePoint,"var n = 0;\nfunction fcn() { n += 1; };\nbase.forEachCodePoint( 'hello world!', fcn );\nn\n"
base.forEachGraphemeCluster,"var n = 0;\nfunction fcn() { n += 1; };\nbase.forEachGraphemeCluster( 'hello world!', fcn );\nn\n"
base.fresnel,"var y = base.fresnel( 0.0 )\ny = base.fresnel( 1.0 )\ny = base.fresnel( PINF )\ny = base.fresnel( NINF )\ny = base.fresnel( NaN )\n"
base.fresnel.assign,"var out = new Float64Array( 2 );\nvar v = base.fresnel.assign( 0.0, out, 1, 0 )\nvar bool = ( v === out )\n"
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/repl/code-blocks/data/data.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion lib/node_modules/@stdlib/repl/help/data/data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -848,8 +848,9 @@ base.floorb,"\nbase.floorb( x, n, b )\n Rounds a numeric value to the nearest
base.floorf,"\nbase.floorf( x )\n Rounds a single-precision floating-point number toward negative infinity.\n\n Parameters\n ----------\n x: number\n Input value.\n\n Returns\n -------\n y: number\n Rounded value.\n\n Examples\n --------\n > var y = base.floorf( 3.14 )\n 3.0\n > y = base.floorf( -4.2 )\n -5.0\n > y = base.floorf( -4.6 )\n -5.0\n > y = base.floorf( 9.5 )\n 9.0\n > y = base.floorf( -0.0 )\n -0.0\n\n See Also\n --------\n base.ceilf, base.floor\n"
base.floorn,"\nbase.floorn( x, n )\n Rounds a numeric value to the nearest multiple of `10^n` toward negative\n infinity.\n\n When operating on floating-point numbers in bases other than `2`, rounding\n to specified digits can be inexact.\n\n Parameters\n ----------\n x: number\n Input value.\n\n n: integer\n Integer power of 10.\n\n Returns\n -------\n y: number\n Rounded value.\n\n Examples\n --------\n // Round to 4 decimal places:\n > var y = base.floorn( 3.14159, -4 )\n 3.1415\n\n // If `n = 0`, standard round toward negative infinity behavior:\n > y = base.floorn( 3.14159, 0 )\n 3.0\n\n // Round to nearest thousand:\n > y = base.floorn( 12368.0, 3 )\n 12000.0\n\n\n See Also\n --------\n base.ceiln, base.floor, base.floorb, base.roundn\n"
base.floorsd,"\nbase.floorsd( x, n[, b] )\n Rounds a numeric value to the nearest number toward negative infinity with\n `n` significant figures.\n\n Parameters\n ----------\n x: number\n Input value.\n\n n: integer\n Number of significant figures. Must be greater than 0.\n\n b: integer (optional)\n Base. Must be greater than 0. Default: 10.\n\n Returns\n -------\n y: number\n Rounded value.\n\n Examples\n --------\n > var y = base.floorsd( 3.14159, 5 )\n 3.1415\n > y = base.floorsd( 3.14159, 1 )\n 3.0\n > y = base.floorsd( 12368.0, 2 )\n 12000.0\n > y = base.floorsd( 0.0313, 2, 2 )\n 0.03125\n\n See Also\n --------\n base.ceilsd, base.floor, base.roundsd, base.truncsd\n"
base.forEachChar,"\nbase.forEachChar( str, clbk[, thisArg] )\n Invokes a function for each UTF-16 code unit in a string.\n\n When invoked, the provided function is provided three arguments:\n\n - value: character\n - index: character index\n - str: input string\n\n Parameters\n ----------\n str: string\n Input string over which to iterate.\n\n clbk: Function\n The function to invoke for each UTF-16 code unit in the input string.\n\n thisArg: any (optional)\n Execution context.\n\n Returns\n -------\n out: string\n Input string.\n\n Examples\n --------\n > var n = 0;\n > function fcn() { n += 1; };\n > base.forEachChar( 'hello world!', fcn );\n > n\n 12\n\n See Also\n --------\n base.forEachCodePoint, base.forEachGraphemeCluster, forEachChar\n"
base.forEachCodePoint,"\nbase.forEachCodePoint( str, clbk[, thisArg] )\n Invokes a function for each Unicode code point in a string.\n\n When invoked, the provided function is provided three arguments:\n\n - value: code point\n - index: starting code point index\n - str: input string\n\n Parameters\n ----------\n str: string\n Input string over which to iterate.\n\n clbk: Function\n The function to invoke for each Unicode code point in the input string.\n\n thisArg: any (optional)\n Execution context.\n\n Returns\n -------\n out: string\n Input string.\n\n Examples\n --------\n > var n = 0;\n > function fcn() { n += 1; };\n > base.forEachCodePoint( 'hello world!', fcn );\n > n\n 12\n\n See Also\n --------\n base.forEachGraphemeCluster, forEachChar\n"
base.forEachGraphemeCluster,"\nbase.forEachGraphemeCluster( str, clbk[, thisArg] )\n Invokes a function for each grapheme cluster (i.e., user-perceived\n character) in a string.\n\n When invoked, the provided function is provided three arguments:\n\n - value: grapheme cluster\n - index: starting grapheme cluster index\n - str: input string\n\n Parameters\n ----------\n str: string\n Input string over which to iterate.\n\n clbk: Function\n The function to invoke for each grapheme cluster in the input string.\n\n thisArg: any (optional)\n Execution context.\n\n Returns\n -------\n out: string\n Input string.\n\n Examples\n --------\n > var n = 0;\n > function fcn() { n += 1; };\n > base.forEachGraphemeCluster( 'hello world!', fcn );\n > n\n 12\n\n See Also\n --------\n forEachChar\n"
base.forEachGraphemeCluster,"\nbase.forEachGraphemeCluster( str, clbk[, thisArg] )\n Invokes a function for each grapheme cluster (i.e., user-perceived\n character) in a string.\n\n When invoked, the provided function is provided three arguments:\n\n - value: grapheme cluster\n - index: starting grapheme cluster index\n - str: input string\n\n Parameters\n ----------\n str: string\n Input string over which to iterate.\n\n clbk: Function\n The function to invoke for each grapheme cluster in the input string.\n\n thisArg: any (optional)\n Execution context.\n\n Returns\n -------\n out: string\n Input string.\n\n Examples\n --------\n > var n = 0;\n > function fcn() { n += 1; };\n > base.forEachGraphemeCluster( 'hello world!', fcn );\n > n\n 12\n\n See Also\n --------\n base.forEachCodePoint, forEachChar\n"
base.fresnel,"\nbase.fresnel( x )\n Computes the Fresnel integrals S(x) and C(x).\n\n Parameters\n ----------\n x: number\n Input value.\n\n Returns\n -------\n y: Array<number>\n S(x) and C(x).\n\n Examples\n --------\n > var y = base.fresnel( 0.0 )\n [ ~0.0, ~0.0 ]\n > y = base.fresnel( 1.0 )\n [ ~0.438, ~0.780 ]\n > y = base.fresnel( PINF )\n [ ~0.5, ~0.5 ]\n > y = base.fresnel( NINF )\n [ ~-0.5, ~-0.5 ]\n > y = base.fresnel( NaN )\n [ NaN, NaN ]\n\n\nbase.fresnel.assign( x, out, stride, offset )\n Computes the Fresnel integrals S(x) and C(x) and assigns results to a\n provided output array.\n\n Parameters\n ----------\n x: number\n Input value.\n\n out: Array<number>\n Destination array.\n\n stride: integer\n Output array stride.\n\n offset: integer\n Output array index offset.\n\n Returns\n -------\n out: Array<number>\n S(x) and C(x).\n\n Examples\n --------\n > var out = new Float64Array( 2 );\n > var v = base.fresnel.assign( 0.0, out, 1, 0 )\n <Float64Array>[ ~0.0, ~0.0 ]\n > var bool = ( v === out )\n true\n\n See Also\n --------\n base.fresnelc, base.fresnels"
base.fresnel.assign,"\nbase.fresnel.assign( x, out, stride, offset )\n Computes the Fresnel integrals S(x) and C(x) and assigns results to a\n provided output array.\n\n Parameters\n ----------\n x: number\n Input value.\n\n out: Array<number>\n Destination array.\n\n stride: integer\n Output array stride.\n\n offset: integer\n Output array index offset.\n\n Returns\n -------\n out: Array<number>\n S(x) and C(x).\n\n Examples\n --------\n > var out = new Float64Array( 2 );\n > var v = base.fresnel.assign( 0.0, out, 1, 0 )\n <Float64Array>[ ~0.0, ~0.0 ]\n > var bool = ( v === out )\n true\n\n See Also\n --------\n base.fresnelc, base.fresnels"
base.fresnelc,"\nbase.fresnelc( x )\n Computes the Fresnel integral C(x).\n\n Parameters\n ----------\n x: number\n Input value.\n\n Returns\n -------\n y: number\n C(x).\n\n Examples\n --------\n > var y = base.fresnelc( 0.0 )\n ~0.0\n > y = base.fresnelc( 1.0 )\n ~0.780\n > y = base.fresnelc( PINF )\n ~0.5\n > y = base.fresnelc( NINF )\n ~-0.5\n > y = base.fresnelc( NaN )\n NaN\n\n See Also\n --------\n base.fresnel, base.fresnels\n"
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/repl/help/data/data.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/node_modules/@stdlib/repl/info/data/data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,8 @@ base.floorb,"\nbase.floorb( x:number, n:integer, b:integer )\n Rounds a numer
base.floorf,"\nbase.floorf( x:number )\n Rounds a single-precision floating-point number toward negative infinity.\n"
base.floorn,"\nbase.floorn( x:number, n:integer )\n Rounds a numeric value to the nearest multiple of `10^n` toward negative\n infinity.\n"
base.floorsd,"\nbase.floorsd( x:number, n:integer[, b:integer] )\n Rounds a numeric value to the nearest number toward negative infinity with\n `n` significant figures.\n"
base.forEachChar,"\nbase.forEachChar( str:string, clbk:Function[, thisArg:any] )\n Invokes a function for each UTF-16 code unit in a string.\n"
base.forEachCodePoint,"\nbase.forEachCodePoint( str:string, clbk:Function[, thisArg:any] )\n Invokes a function for each Unicode code point in a string.\n"
base.forEachGraphemeCluster,"\nbase.forEachGraphemeCluster( str:string, clbk:Function[, thisArg:any] )\n Invokes a function for each grapheme cluster (i.e., user-perceived\n character) in a string.\n"
base.fresnel,"\nbase.fresnel( x:number )\n Computes the Fresnel integrals S(x) and C(x).\n"
base.fresnel.assign,"\nbase.fresnel.assign( x:number, out:Array<number>, stride:integer, \n offset:integer )\n Computes the Fresnel integrals S(x) and C(x) and assigns results to a\n provided output array.\n"
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/repl/info/data/data.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/node_modules/@stdlib/repl/signature/data/data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,8 @@ base.floorb,"base.floorb( x, n, b )"
base.floorf,"base.floorf( x )"
base.floorn,"base.floorn( x, n )"
base.floorsd,"base.floorsd( x, n[, b] )"
base.forEachChar,"base.forEachChar( str, clbk[, thisArg] )"
base.forEachCodePoint,"base.forEachCodePoint( str, clbk[, thisArg] )"
base.forEachGraphemeCluster,"base.forEachGraphemeCluster( str, clbk[, thisArg] )"
base.fresnel,"base.fresnel( x )"
base.fresnel.assign,"base.fresnel.assign( x, out, stride, offset )"
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/repl/signature/data/data.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/node_modules/@stdlib/repl/typed-signature/data/data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,8 @@ base.floorb,"base.floorb( x:number, n:integer, b:integer )"
base.floorf,"base.floorf( x:number )"
base.floorn,"base.floorn( x:number, n:integer )"
base.floorsd,"base.floorsd( x:number, n:integer[, b:integer] )"
base.forEachChar,"base.forEachChar( str:string, clbk:Function[, thisArg:any] )"
base.forEachCodePoint,"base.forEachCodePoint( str:string, clbk:Function[, thisArg:any] )"
base.forEachGraphemeCluster,"base.forEachGraphemeCluster( str:string, clbk:Function[, thisArg:any] )"
base.fresnel,"base.fresnel( x:number )"
base.fresnel.assign,"base.fresnel.assign( x:number, out:Array<number>, stride:integer, offset:integer )"
Expand Down

Large diffs are not rendered by default.

0 comments on commit 775c156

Please sign in to comment.