From a6b83864d8ced0076f298134a341f3b899237c5f Mon Sep 17 00:00:00 2001 From: Sachinn-64 Date: Wed, 29 Jul 2026 02:15:27 +0530 Subject: [PATCH 1/2] feat: add plot/vega/base/assert/is-rect-mark-encoding --- .../assert/is-rect-mark-encoding/README.md | 139 ++++++++++++++++++ .../benchmark/benchmark.js | 106 +++++++++++++ .../is-rect-mark-encoding/docs/repl.txt | 30 ++++ .../docs/types/index.d.ts | 54 +++++++ .../is-rect-mark-encoding/docs/types/test.ts | 34 +++++ .../is-rect-mark-encoding/examples/index.js | 44 ++++++ .../assert/is-rect-mark-encoding/lib/index.js | 57 +++++++ .../assert/is-rect-mark-encoding/lib/main.js | 72 +++++++++ .../assert/is-rect-mark-encoding/package.json | 70 +++++++++ .../assert/is-rect-mark-encoding/test/test.js | 86 +++++++++++ 10 files changed, 692 insertions(+) create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/README.md create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/examples/index.js create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/lib/index.js create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/lib/main.js create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/package.json create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/test/test.js diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/README.md b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/README.md new file mode 100644 index 000000000000..b2590d1cbb06 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/README.md @@ -0,0 +1,139 @@ + + +# isRectMarkEncoding + +> Test if an input value is a rect mark [encoding][@stdlib/plot/vega/mark/rect/encoding]. + + + +
+ +
+ + + + + +
+ +## Usage + +```javascript +var isRectMarkEncoding = require( '@stdlib/plot/vega/base/assert/is-rect-mark-encoding' ); +``` + +#### isRectMarkEncoding( value ) + +Tests if an input value is a rect mark [encoding][@stdlib/plot/vega/mark/rect/encoding]. + +```javascript +var Value = require( '@stdlib/plot/vega/value/ctor' ); +var EncodingSet = require( '@stdlib/plot/vega/mark/rect/encoding-set' ); +var Encoding = require( '@stdlib/plot/vega/mark/rect/encoding' ); + +var v = new Encoding({ + 'enter': new EncodingSet({ + 'x': new Value({ + 'field': 'x', + 'scale': 'xScale' + }) + }) +}); +var bool = isRectMarkEncoding( v ); +// returns true + +bool = isRectMarkEncoding( {} ); +// returns false +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var Value = require( '@stdlib/plot/vega/value/ctor' ); +var EncodingSet = require( '@stdlib/plot/vega/mark/rect/encoding-set' ); +var Encoding = require( '@stdlib/plot/vega/mark/rect/encoding' ); +var isRectMarkEncoding = require( '@stdlib/plot/vega/base/assert/is-rect-mark-encoding' ); + +var v = new Encoding({ + 'update': new EncodingSet({ + 'x': new Value({ + 'field': 'x', + 'scale': 'xScale' + }) + }) +}); +var bool = isRectMarkEncoding( v ); +// returns true + +bool = isRectMarkEncoding( {} ); +// returns false + +bool = isRectMarkEncoding( 'foo' ); +// returns false +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/benchmark/benchmark.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/benchmark/benchmark.js new file mode 100644 index 000000000000..ed1d6b5f529c --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/benchmark/benchmark.js @@ -0,0 +1,106 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive; +var EncodingSet = require( '@stdlib/plot/vega/mark/rect/encoding-set' ); +var Encoding = require( '@stdlib/plot/vega/mark/rect/encoding' ); +var Value = require( '@stdlib/plot/vega/value/ctor' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var isRectMarkEncoding = require( './../lib' ); + + +// MAIN // + +bench( format( '%s::true', pkg ), function benchmark( b ) { + var values; + var out; + var v; + var i; + + values = [ + new Encoding({ + 'update': new EncodingSet({ + 'x': new Value({ + 'field': 'x', + 'scale': 'xScale' + }) + }) + }), + new Encoding({ + 'enter': new EncodingSet({ + 'y': new Value({ + 'field': 'y', + 'scale': 'yScale' + }) + }) + }) + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = values[ i%values.length ]; + out = isRectMarkEncoding( v ); + if ( typeof out !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( out ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( format( '%s::false', pkg ), function benchmark( b ) { + var values; + var out; + var v; + var i; + + values = [ + 'foo', + 'bar', + '', + 'beep', + 'boop', + [], + {} + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = values[ i%values.length ]; + out = isRectMarkEncoding( v ); + if ( typeof out !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( out ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/repl.txt b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/repl.txt new file mode 100644 index 000000000000..62898258698d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/repl.txt @@ -0,0 +1,30 @@ + +{{alias}}( value ) + Tests if an input value is a rect mark encoding. + + Parameters + ---------- + value: any + Value to test. + + Returns + ------- + bool: boolean + Boolean indicating if an input value is a rect mark encoding. + + Examples + -------- + > var opts = { 'field': 'x', 'scale': 'xScale' }; + > var v = new {{alias:@stdlib/plot/vega/value/ctor}}( opts ); + > opts = { 'x': v }; + > var eset = new {{alias:@stdlib/plot/vega/mark/rect/encoding-set}}( opts ); + > opts = { 'update': eset }; + > var enc = new {{alias:@stdlib/plot/vega/mark/rect/encoding}}( opts ); + > var bool = {{alias}}( enc ) + true + > bool = {{alias}}( {} ) + false + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/types/index.d.ts b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/types/index.d.ts new file mode 100644 index 000000000000..9d4ba8f601d7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/types/index.d.ts @@ -0,0 +1,54 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Tests whether an input value is a rect mark encoding. +* +* @param v - value to test +* @returns boolean indicating whether an input value is a rect mark encoding +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* var EncodingSet = require( '@stdlib/plot/vega/mark/rect/encoding-set' ); +* var Encoding = require( '@stdlib/plot/vega/mark/rect/encoding' ); +* +* var v = new Encoding({ +* 'update': new EncodingSet({ +* 'x': new Value({ +* 'field': 'x', +* 'scale': 'xScale' +* }) +* }) +* }); +* var bool = isRectMarkEncoding( v ); +* // returns true +* +* bool = isRectMarkEncoding( {} ); +* // returns false +* +* bool = isRectMarkEncoding( 'foo' ); +* // returns false +*/ +declare function isRectMarkEncoding( v: any ): boolean; + + +// EXPORTS // + +export = isRectMarkEncoding; diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/types/test.ts b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/types/test.ts new file mode 100644 index 000000000000..c2004834ed6e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/types/test.ts @@ -0,0 +1,34 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import isRectMarkEncoding = require( './index' ); + + +// TESTS // + +// The function returns a boolean... +{ + isRectMarkEncoding( {} ); // $ExpectType boolean + isRectMarkEncoding( 'foo' ); // $ExpectType boolean +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + isRectMarkEncoding(); // $ExpectError + isRectMarkEncoding( undefined, 123 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/examples/index.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/examples/index.js new file mode 100644 index 000000000000..55ae7091d74e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/examples/index.js @@ -0,0 +1,44 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var Value = require( '@stdlib/plot/vega/value/ctor' ); +var EncodingSet = require( '@stdlib/plot/vega/mark/rect/encoding-set' ); +var Encoding = require( '@stdlib/plot/vega/mark/rect/encoding' ); +var isRectMarkEncoding = require( './../lib' ); + +var v = new Encoding({ + 'update': new EncodingSet({ + 'x': new Value({ + 'field': 'x', + 'scale': 'xScale' + }) + }) +}); +var bool = isRectMarkEncoding( v ); +console.log( bool ); +// => true + +bool = isRectMarkEncoding( {} ); +console.log( bool ); +// => false + +bool = isRectMarkEncoding( 'foo' ); +console.log( bool ); +// => false diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/lib/index.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/lib/index.js new file mode 100644 index 000000000000..951c5c3fc132 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/lib/index.js @@ -0,0 +1,57 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Test whether an input value is a rect mark encoding. +* +* @module @stdlib/plot/vega/base/assert/is-rect-mark-encoding +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* var EncodingSet = require( '@stdlib/plot/vega/mark/rect/encoding-set' ); +* var Encoding = require( '@stdlib/plot/vega/mark/rect/encoding' ); +* var isRectMarkEncoding = require( '@stdlib/plot/vega/base/assert/is-rect-mark-encoding' ); +* +* var v = new Encoding({ +* 'update': new EncodingSet({ +* 'x': new Value({ +* 'field': 'x', +* 'scale': 'xScale' +* }) +* }) +* }); +* var bool = isRectMarkEncoding( v ); +* // returns true +* +* bool = isRectMarkEncoding( {} ); +* // returns false +* +* bool = isRectMarkEncoding( 'foo' ); +* // returns false +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/lib/main.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/lib/main.js new file mode 100644 index 000000000000..7880fd816c0c --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/lib/main.js @@ -0,0 +1,72 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var isObject = require( '@stdlib/assert/is-object' ); +var Encoding = require( '@stdlib/plot/vega/mark/rect/encoding' ); + + +// MAIN // + +/** +* Tests whether an input value is a rect mark encoding. +* +* @param {*} value - value to test +* @returns {boolean} boolean indicating whether an input value is a rect mark encoding +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* var EncodingSet = require( '@stdlib/plot/vega/mark/rect/encoding-set' ); +* var Encoding = require( '@stdlib/plot/vega/mark/rect/encoding' ); +* +* var v = new Encoding({ +* 'update': new EncodingSet({ +* 'x': new Value({ +* 'field': 'x', +* 'scale': 'xScale' +* }) +* }) +* }); +* var bool = isRectMarkEncoding( v ); +* // returns true +* +* bool = isRectMarkEncoding( {} ); +* // returns false +* +* bool = isRectMarkEncoding( 'foo' ); +* // returns false +*/ +function isRectMarkEncoding( value ) { + return ( + value instanceof Encoding || + + // The following is a set of rather imperfect heuristics for handling instances originating in a different realm... + ( + isObject( value ) && + value.constructor.name === 'RectEncoding' + ) + ); +} + + +// EXPORTS // + +module.exports = isRectMarkEncoding; diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/package.json b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/package.json new file mode 100644 index 000000000000..71d778c21146 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/package.json @@ -0,0 +1,70 @@ +{ + "name": "@stdlib/plot/vega/base/assert/is-rect-mark-encoding", + "version": "0.0.0", + "description": "Test if an input value is a rect mark encoding.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "plot", + "base", + "vega", + "utilities", + "utility", + "utils", + "util", + "assert", + "test", + "check", + "is", + "valid", + "validate", + "validation", + "isvalid" + ], + "__stdlib__": {} +} diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/test/test.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/test/test.js new file mode 100644 index 000000000000..1c7799eafc4c --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/test/test.js @@ -0,0 +1,86 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var Value = require( '@stdlib/plot/vega/value/ctor' ); +var EncodingSet = require( '@stdlib/plot/vega/mark/rect/encoding-set' ); +var Encoding = require( '@stdlib/plot/vega/mark/rect/encoding' ); +var isRectMarkEncoding = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof isRectMarkEncoding, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns `true` if provided a rect mark encoding instance', function test( t ) { + var values; + var bool; + var i; + + values = [ + new Encoding({ + 'update': new EncodingSet({ + 'x': new Value({ + 'field': 'x', + 'scale': 'xScale' + }) + }) + }) + ]; + for ( i = 0; i < values.length; i++ ) { + bool = isRectMarkEncoding( values[ i ] ); + t.strictEqual( bool, true, 'returns expected value when provided '+values[ i ] ); + } + t.end(); +}); + +tape( 'the function returns `false` if not provided a rect mark encoding instance', function test( t ) { + var values; + var bool; + var i; + + values = [ + '', + 'beep', + 'boop', + 'foo', + 'bar', + 5, + NaN, + true, + false, + null, + void 0, + [], + {}, + function noop() {} + ]; + for ( i = 0; i < values.length; i++ ) { + bool = isRectMarkEncoding( values[ i ] ); + t.strictEqual( bool, false, 'returns expected value when provided '+values[ i ] ); + } + t.end(); +}); From 9b1f12a05ca34c04ed90836f6b7cee4290b6539e Mon Sep 17 00:00:00 2001 From: Athan Date: Tue, 28 Jul 2026 20:21:45 -0700 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- .../base/assert/is-rect-mark-encoding/docs/repl.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/repl.txt b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/repl.txt index 62898258698d..73d766a07841 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/repl.txt +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-rect-mark-encoding/docs/repl.txt @@ -14,12 +14,12 @@ Examples -------- - > var opts = { 'field': 'x', 'scale': 'xScale' }; - > var v = new {{alias:@stdlib/plot/vega/value/ctor}}( opts ); - > opts = { 'x': v }; - > var eset = new {{alias:@stdlib/plot/vega/mark/rect/encoding-set}}( opts ); - > opts = { 'update': eset }; - > var enc = new {{alias:@stdlib/plot/vega/mark/rect/encoding}}( opts ); + > var o = { 'field': 'x', 'scale': 'xScale' }; + > var v = new {{alias:@stdlib/plot/vega/value/ctor}}( o ); + > o = { 'x': v }; + > v = new {{alias:@stdlib/plot/vega/mark/rect/encoding-set}}( o ); + > o = { 'update': v }; + > var enc = new {{alias:@stdlib/plot/vega/mark/rect/encoding}}( o ); > var bool = {{alias}}( enc ) true > bool = {{alias}}( {} )