Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
350 commits
Select commit Hold shift + click to select a range
7d751a4
docs: update comments to reduce copy-paste errors
kgryte Jul 22, 2025
ca6a6c6
feat: add `plot/vega/base/assert/is-autosize`
kgryte Jul 22, 2025
d92a00c
feat: add `plot/vega/padding` initial implementation
kgryte Jul 22, 2025
2827f8a
feat: add `plot/vega/base/assert/is-padding`
kgryte Jul 22, 2025
399e924
feat: add `autosize` and `padding` support
kgryte Jul 22, 2025
d91fe61
docs: reduce risk of copy-paste mistakes
kgryte Jul 22, 2025
55fb37c
refactor: allow title `text` field to be optional
kgryte Jul 22, 2025
143ac44
fix: use correct field
kgryte Jul 22, 2025
3e2dfaf
feat: add initial `plot/base/view` implementation
kgryte Jul 23, 2025
7ab078a
feat: add stubs for remaining properties
kgryte Jul 23, 2025
04656cd
feat: add `$schema` property
kgryte Jul 23, 2025
c9d2906
refactor: ensure all properties have defaults and disallow `undefined`
kgryte Jul 23, 2025
58533d5
remove: remove `plot/base/ctor`
kgryte Jul 23, 2025
1771c47
feat: add `background` support
kgryte Jul 23, 2025
c25b8e8
feat: add initial `plot/charts/base/ctor` implementation
kgryte Jul 23, 2025
1700018
refactor: add missing `break`
kgryte Jul 24, 2025
36f2970
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Jul 24, 2025
06b7301
chore: update copyright years
kgryte Jul 24, 2025
30f2c11
refactor: add padding defaults and remove parent method override
kgryte Jul 24, 2025
b269d9e
feat: add initial `plot/charts/base/quantitative` implementation
kgryte Jul 24, 2025
e835bf4
feat: add initial `plot/vega/base/to-json` implementation
kgryte Jul 25, 2025
c969262
feat: add initial `plot/vega/base/transform-validation-message` imple…
kgryte Jul 25, 2025
30c6108
refactor: emit change object and use utilities
kgryte Jul 25, 2025
45dfa8e
feat: add initial `plot/vega/base/property2object` implementation
kgryte Jul 25, 2025
2f21ffb
refactor: reduce copy-paste errors by consolidating property names
kgryte Jul 25, 2025
0a2a5b3
refactor: use properties object and use utilities
kgryte Jul 25, 2025
58e419b
refactor: use properties object and use utilities
kgryte Jul 25, 2025
572f199
refactor: use properties object and use utilities
kgryte Jul 25, 2025
206f511
refactor: use properties object and use utilities
kgryte Jul 25, 2025
1d341c0
refactor: use properties object and use utilities
kgryte Jul 25, 2025
aca2d21
refactor: use property object and use utilities
kgryte Jul 25, 2025
f9a880c
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Jul 25, 2025
a64de32
feat: add initial `plot/vega/log-scale` implementation
kgryte Jul 25, 2025
e7bbc62
fix: update log namespace
kgryte Jul 25, 2025
2317160
feat: add initial `plot/vega/power-scale` implementation
kgryte Jul 25, 2025
fe5959a
feat: add initial `plot/vega/sqrt-scale` implementation
kgryte Jul 25, 2025
e8fff4d
docs: update description
kgryte Jul 25, 2025
f63458d
fix: ensure correct JSON serialization
kgryte Jul 25, 2025
cb301ea
fix: ensure correct JSON serialization
kgryte Jul 25, 2025
5c7a3fc
refactor: allow non-plain objects
kgryte Jul 25, 2025
9314600
refactor: allow non-plain objects
kgryte Jul 25, 2025
dce8a0d
refactor: allow non-plain objects
kgryte Jul 25, 2025
770c58a
refactor: allow non-plain objects
kgryte Jul 25, 2025
a8e2a23
refactor: allow non-plain objects
kgryte Jul 25, 2025
13e6e8c
fix: ensure correct JSON serialization
kgryte Jul 25, 2025
2ef5e06
refactor: allow non-plain objects
kgryte Jul 25, 2025
308a175
fix: ensure correct JSON serialization
kgryte Jul 25, 2025
b4481d3
refactor: allow non-plain objects
kgryte Jul 25, 2025
003656f
refactor: allow non-plain objects
kgryte Jul 25, 2025
7085304
refactor: allow non-plain objects
kgryte Jul 25, 2025
e260ceb
docs: order options in alphabetical order
kgryte Jul 25, 2025
389e289
feat: add initial `plot/vega/symmetric-log-scale` implementation
kgryte Jul 25, 2025
4d46474
feat: add initial `plot/vega/time-scale` implementation
kgryte Jul 25, 2025
fd41f5e
docs: fix supported types
kgryte Jul 25, 2025
962a6b4
feat: add initial `plot/vega/utc-scale` implementation
kgryte Jul 25, 2025
523d6f9
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Jul 25, 2025
a943492
fix: ensure private properties are always set
kgryte Jul 25, 2025
9c5c794
feat: add initial `plot/vega/scale-ctors` implementation
kgryte Jul 25, 2025
69b30dd
refactor!: require providing a default scale type and return a typed …
kgryte Jul 25, 2025
cb1e4be
refactor!: switch argument order and always return a scale of a parti…
kgryte Jul 25, 2025
12c5472
remove: remove `plot/vega/x-quantitative-scale`
kgryte Jul 25, 2025
a65cee5
remove: remove `plot/vega/y-quantitative-scale`
kgryte Jul 25, 2025
b1b05ab
feat: add initial `plot/vega/x-linear-scale` implementation
kgryte Jul 25, 2025
b110d85
feat: add initial `plot/vega/y-linear-scale` implementation
kgryte Jul 25, 2025
e60c56e
remove: remove `plot/vega/x-scale`
kgryte Jul 25, 2025
12b7057
remove: remove `plot/vega/y-scale`
kgryte Jul 25, 2025
6cc6a72
remove: remove `plot/vega/named-quantitative-scale`
kgryte Jul 25, 2025
b4bb7cc
feat: add a `properties` property for resolving the list of component…
kgryte Jul 25, 2025
fe56d73
feat: add `plot/vega/base/assert/is-scale-name-array`
kgryte Jul 25, 2025
3c1f3f3
docs: update description
kgryte Jul 25, 2025
5992440
docs: update description
kgryte Jul 25, 2025
2a13b22
docs: update description
kgryte Jul 25, 2025
284d152
feat: add initial `plot/vega/generalized-scale` implementation
kgryte Jul 26, 2025
c775292
feat: add initial `plot/vega/x-quantitative-scale` implementation
kgryte Jul 26, 2025
07b098b
feat: add initial `plot/vega/y-quantitative-scale` implementation
kgryte Jul 26, 2025
800ccfb
fix: ensure thrown error is informative
kgryte Jul 26, 2025
a3366ad
fix: update error message
kgryte Jul 26, 2025
17cc106
feat: add initial `plot/vega/ordinal-scale` implementation
kgryte Jul 26, 2025
18a1b98
feat: add `plot/vega/scale/base/ctor`
kgryte Jul 26, 2025
8f05bf4
refactor: update require paths
kgryte Jul 26, 2025
ff9d087
remove: remove `plot/vega/scale`
kgryte Jul 26, 2025
3cf3599
feat: add `plot/vega/scale/*` packages
kgryte Jul 26, 2025
deb5e6b
refactor: update paths
kgryte Jul 26, 2025
30e2b96
remove: remove top-level scale packages in favor of `plot/vega/scale/*`
kgryte Jul 26, 2025
0c28df6
feat: add `plot/vega/scale/names`
kgryte Jul 26, 2025
1c3a300
refactor: update require paths
kgryte Jul 26, 2025
da1a158
remove: remove `plot/vega/base/scales` in favor of `plot/vega/scale/n…
kgryte Jul 26, 2025
619c628
feat: add `plot/vega/scale/base/range-defaults`
kgryte Jul 26, 2025
bfb3e8d
refactor: update paths
kgryte Jul 26, 2025
0ff2b84
remove: remove `plot/vega/base/scale-range-defaults` in favor of `plo…
kgryte Jul 26, 2025
7a5c7ab
feat: add `plot/vega/scale/base/range-interpolation-methods`
kgryte Jul 26, 2025
28527fb
refactor: update paths
kgryte Jul 26, 2025
b5d08d5
remove: remove `plot/vega/base/scale-range-interpolation-methods` in …
kgryte Jul 26, 2025
d89ac19
feat: add `plot/vega/axis/ctor`
kgryte Jul 26, 2025
0863784
refactor: update paths
kgryte Jul 26, 2025
f1631cd
remove: remove `plot/vega/axis` in favor of `plot/vega/axis/ctor`
kgryte Jul 26, 2025
a77bc21
feat: add `plot/vega/axis/orientations`
kgryte Jul 26, 2025
b9d7ef6
refactor: update paths
kgryte Jul 26, 2025
8439c13
remove: remove `plot/vega/base/axis-orientations` in favor of `plot/v…
kgryte Jul 26, 2025
a454a56
feat: add `plot/vega/axis/x-orientations`
kgryte Jul 26, 2025
c3e608e
refactor: update paths
kgryte Jul 26, 2025
3222be8
remove: remove `plot/vega/base/x-axis-orientations` in favor of `plot…
kgryte Jul 26, 2025
7e4a6b8
feat: add `plot/vega/axis/y-orientations`
kgryte Jul 26, 2025
54c75a3
refactor: update paths
kgryte Jul 26, 2025
dee68ab
remove: remove `plot/vega/base/y-axis-orientations` in favor of `plot…
kgryte Jul 26, 2025
6f5aabe
feat: add `plot/vega/builder`
kgryte Jul 26, 2025
345d63c
refactor: update require path
kgryte Jul 26, 2025
43f7f03
remove: remove `plot/vega/visualization` in favor of `plot/vega/builder`
kgryte Jul 26, 2025
47d9e43
feat: add `plot/vega/autosize/ctor`
kgryte Jul 26, 2025
aa662ab
refactor: update paths
kgryte Jul 26, 2025
60ed1d6
refactor: update paths
kgryte Jul 26, 2025
f24eb0b
remove: remove `plot/vega/autosize` in favor of `plot/vega/autosize/c…
kgryte Jul 26, 2025
01e9565
feat: add `plot/vega/autosize/methods`
kgryte Jul 26, 2025
05de4a0
refactor: update paths and variable names
kgryte Jul 26, 2025
fe12167
remove: remove `plot/vega/base/autosize-size` in favor of `plot/vega/…
kgryte Jul 26, 2025
56800a0
feat: add `plot/vega/base/assert/is-autosize-method`
kgryte Jul 26, 2025
efc6d67
refactor: update paths
kgryte Jul 26, 2025
81bc529
remove: remove `plot/vega/base/assert/is-autosize-type` in favor of `…
kgryte Jul 26, 2025
0a3af3d
feat: add `plot/vega/title/ctor`
kgryte Jul 26, 2025
32444c5
refactor: update paths
kgryte Jul 26, 2025
2f2342b
remove: remove `plot/vega/title` in favor of `plot/vega/title/ctor`
kgryte Jul 26, 2025
66ec691
feat: add `plot/vega/title/orientations`
kgryte Jul 26, 2025
47a2621
refactor: update paths
kgryte Jul 26, 2025
2d3bb17
remove: remove `plot/vega/base/title-orientations` in favor of `plot/…
kgryte Jul 26, 2025
255b793
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Jul 26, 2025
104d03d
feat: add `plot/vega/padding/ctor`
kgryte Jul 26, 2025
c0399a0
refactor: update paths
kgryte Jul 26, 2025
aeb9b54
remove: remove `plot/vega/padding` in favor of `plot/vega/padding/ctor`
kgryte Jul 26, 2025
99c6d7d
refactor: update logging namespace
kgryte Jul 26, 2025
69df71a
feat: add initial `plot/vega/trigger` implementation
kgryte Jul 28, 2025
cd2d5be
fix: add missing `index.js` file
kgryte Jul 28, 2025
ba9a3e8
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Jul 28, 2025
bcb6f23
feat: add `plot/vega/base/assert/is-trigger`
kgryte Jul 28, 2025
acbb3cb
feat: add `plot/vega/base/assert/is-trigger-array`
kgryte Jul 28, 2025
b1e2f0a
feat: add initial `plot/vega/data/base/ctor` implementation
kgryte Jul 28, 2025
1dab157
feat: add initial `plot/vega/data/values` implementation
kgryte Jul 28, 2025
b6b39d7
refactor: use utility
kgryte Jul 28, 2025
db0d9ec
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Jul 28, 2025
4998263
fix: add missing `toJSON` method
kgryte Jul 28, 2025
23d0eda
fix: avoid explicit serialization of inlined values
kgryte Jul 28, 2025
f220119
feat: add initial `plot/vega/data/tidy/from-array` implementation
kgryte Jul 28, 2025
4974627
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Jul 28, 2025
9ceb3c1
docs: update description
kgryte Jul 28, 2025
e3d18a5
feat: add initial `plot/vega/data/tidy/from-nested-array` implementation
kgryte Jul 28, 2025
8359111
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Jul 29, 2025
5fef203
feat: add initial `plot/vega/tidy/from-arrays` implementation
kgryte Jul 29, 2025
72d2f44
feat: add initial `plot/vega/tidy/from-object-array` implementation
kgryte Jul 29, 2025
c4bc0f3
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Jul 29, 2025
44db454
feat: add initial `plot/vega/data/tidy/from-vectors` implementation
kgryte Jul 29, 2025
2a866dc
feat: add initial `plot/vega/data/type/from-vector` implementation
kgryte Jul 29, 2025
4c02999
refactor: allow the `mapping` argument to be optional
kgryte Jul 29, 2025
3279352
feat: add initial `plot/vega/data/tidy/split-on-key` implementation
kgryte Jul 29, 2025
8d39305
refactor!: update to accept a `DataSet` rather than an array of objects
kgryte Jul 29, 2025
3c4fc87
feat: add initial `plot/vega/data/tidy/from-matrix-columns` implement…
kgryte Jul 29, 2025
a81936f
chore: add TODOs
kgryte Jul 29, 2025
f4f234f
feat: add initial `plot/vega/data/tidy/from-nested-arrays` implementa…
kgryte Jul 29, 2025
b2ec9b1
feat: add initial `plot/vega/data/tidy/from-object-arrays` implementa…
kgryte Jul 29, 2025
6e4efd4
feat: add initial `plot/vega/data/tidy/from-paired-arrays` implementa…
kgryte Jul 29, 2025
8c4e426
feat: add initial `plot/vega/data/tidy/from-paired-vectors` implement…
kgryte Jul 29, 2025
c453a88
feat: add initial `plot/vega/data/tidy/from-paired-matrix-columns` im…
kgryte Jul 29, 2025
83511dc
feat: add initial `plot/vega/data/tidy/from-xy-arguments` implementation
kgryte Jul 31, 2025
c86bbc5
refactor: update argument handling and add support for `labels`
kgryte Jul 31, 2025
913e3b7
docs: update data types
kgryte Jul 31, 2025
908b7df
feat: add `plot/vega/base/assert/is-dataset`
kgryte Aug 1, 2025
1d10ed4
feat: add `plot/vega/base/assert/is-dataset-array`
kgryte Aug 1, 2025
6bc24cc
feat: add support for getting and setting data and add shorthand prop…
kgryte Aug 1, 2025
d4a0d8b
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Aug 1, 2025
30d9761
feat: add `plot/vega/mark/names`
kgryte Aug 2, 2025
2eaa0e3
feat: add `plot/vega/base/assert/is-mark-name`
kgryte Aug 2, 2025
d49c1c2
feat: add initial `plot/vega/mark/base/ctor` implementation
kgryte Aug 2, 2025
ea207e3
feat: add `plot/vega/base/assert/is-mark`
kgryte Aug 2, 2025
45384f5
feat: add `plot/vega/base/assert/is-mark-array`
kgryte Aug 2, 2025
4134161
docs: update type
kgryte Aug 2, 2025
ca13113
refactor: test for an array of marks and enable event listening
kgryte Aug 2, 2025
5cef2e1
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Aug 2, 2025
e12300c
feat: add initial support for `from` property
kgryte Aug 2, 2025
0ffe385
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Aug 11, 2025
579ee4b
feat: add support for various label properties
kgryte Aug 11, 2025
e966d85
feat: add `maxExtent`, `minExtent`, `offset`, and `position` property…
kgryte Aug 12, 2025
8841cb4
feat: add various tick properties
kgryte Aug 12, 2025
397fd40
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Aug 12, 2025
49c50e1
docs: fix type
kgryte Aug 12, 2025
84b8a1a
feat: add z-index support
kgryte Aug 12, 2025
aff47d3
fix: remove default for label baseline
kgryte Aug 12, 2025
2bdec56
feat: add support for remaining tick properties
kgryte Aug 13, 2025
0b8305f
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Aug 13, 2025
fe08c2f
feat: add `format` support
kgryte Aug 13, 2025
26ac82c
feat: add support for `formatType` property
kgryte Aug 13, 2025
dda48ee
fix: remove default for `tickBand` to avoid globbering other settings
kgryte Aug 13, 2025
41eed21
docs: fix example
kgryte Aug 13, 2025
f3c67e0
feat: add support for various axis title properties
kgryte Aug 14, 2025
4cbf306
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Aug 14, 2025
61aa43f
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Aug 15, 2025
cf0ec80
refactor: remove obsolete style sheets
kgryte Aug 16, 2025
b3ec351
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Aug 16, 2025
b20d000
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Aug 16, 2025
927a38f
feat: add initial `plot/base/server` implementation
kgryte Aug 16, 2025
cb5a4b3
refactor: use `plot/base/server` for serving content
kgryte Aug 16, 2025
ec8ea6a
refactor: disallow HTTP/1 requests
kgryte Aug 16, 2025
3d62c92
refactor: remove obsolete expression
kgryte Aug 16, 2025
96abca0
refactor: move variable to parent scope
kgryte Aug 16, 2025
835fd90
refactor: move variables to parent scope and clean-up
kgryte Aug 16, 2025
15566b5
fix: update option handling
kgryte Aug 18, 2025
1877a42
feat: add `server` property
kgryte Aug 18, 2025
225c5a8
refactor: add server implementation and add WIP Electron refactor
kgryte Aug 18, 2025
e6f8305
chore: add vendored files
kgryte Aug 18, 2025
1f46fb3
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Aug 18, 2025
992eada
fix: perform deep equality comparison to avoid false positive change …
kgryte Aug 18, 2025
1411219
fix: set correct property
kgryte Aug 18, 2025
5a7d8b8
fix: ensure change listeners are bound to default objects
kgryte Aug 18, 2025
d9baf7d
refactor: use correct property paths
kgryte Aug 18, 2025
b4e6935
refactor: fix slow rendering bug and create context class
kgryte Aug 18, 2025
18009fe
fix: re-emit event object
kgryte Aug 19, 2025
d59fddd
refactor: add editor support with eager updates
kgryte Aug 19, 2025
3b5a248
refactor: reduce code duplication and add transforms
kgryte Aug 19, 2025
9e7d67a
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Aug 20, 2025
d0815dd
feat: add `plot/vega/base/assert/is-signal-reference`
kgryte Aug 20, 2025
e5e28ab
refactor: replace single script with app bundle
kgryte Aug 21, 2025
ad1dbd5
build: add script for generating a bundle
kgryte Aug 21, 2025
e80a401
refactor: rename `/spec` endpoint to `/schema` to ensure consistent t…
kgryte Aug 21, 2025
e6384ba
refactor: add app source files
kgryte Aug 21, 2025
50be430
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Aug 21, 2025
76ffdc1
feat: add title routes
kgryte Aug 21, 2025
eacbd41
fix: update route path
kgryte Aug 21, 2025
a7d29aa
docs: fix descriptions
kgryte Aug 22, 2025
3922891
refactor: set title defaults
kgryte Aug 22, 2025
18b0ec4
chore: fix function name
kgryte Aug 22, 2025
df1b489
feat: add `plot/vega/base/text-alignments`
kgryte Aug 22, 2025
21eaa1c
feat: add `plot/vega/base/font-styles`
kgryte Aug 22, 2025
cf34296
feat: add `plot/vega/base/font-weights`
kgryte Aug 22, 2025
229ce23
feat: add initial editor config implementations
kgryte Aug 22, 2025
9124ac5
feat: add initial implementation of `plot/vega/editor-config/visualiz…
kgryte Aug 22, 2025
b843de3
refactor: add steps
kgryte Aug 22, 2025
506c685
refactor: add steps
kgryte Aug 22, 2025
6c4b388
docs: update comments
kgryte Aug 22, 2025
b4c0d10
refactor: use editor configurations
kgryte Aug 22, 2025
0dca888
fix: add missing units
kgryte Aug 22, 2025
cec4834
fix: ensure correct default value resolution
kgryte Aug 22, 2025
307fa00
feat: add initial `plot/vega/editor-config/background` implementation
kgryte Aug 22, 2025
746dfc0
fix: special case `background` in order to account for empty string a…
kgryte Aug 22, 2025
76e7eb8
refactor: split transforms into separate files, thus mirroring editor…
kgryte Aug 22, 2025
6c2ab74
chore: rebuild application
kgryte Aug 22, 2025
8aa5514
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Aug 22, 2025
c546ae9
feat: add axes title route and explicitly assign to plot `config` ins…
kgryte Aug 23, 2025
ed584a7
feat: add support for parameterized routes
kgryte Aug 23, 2025
caf1c44
feat: add support for parameterized object paths
kgryte Aug 23, 2025
8f39ff8
feat: add initial support for editing axis properties
kgryte Aug 23, 2025
277185a
chore: rebuild app
kgryte Aug 23, 2025
d3f97a9
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into re…
kgryte Aug 23, 2025
8c0dbe6
chore: update copyright year
kgryte Aug 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
119 changes: 119 additions & 0 deletions lib/node_modules/@stdlib/plot/base/assert/is-line-style/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<!--

@license Apache-2.0

Copyright (c) 2025 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.

-->

# isLineStyle

> Test if an input value is a supported [line style][@stdlib/plot/base/line-styles].

<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->

<section class="intro">

</section>

<!-- /.intro -->

<!-- Package usage documentation. -->

<section class="usage">

## Usage

```javascript
var isLineStyle = require( '@stdlib/plot/base/assert/is-line-style' );
```

#### isLineStyle( value )

Tests if an input value is a supported [line style][@stdlib/plot/base/line-styles].

```javascript
var bool = isLineStyle( '-' );
// returns true

bool = isLineStyle( 'foo' );
// returns false
```

</section>

<!-- /.usage -->

<!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="notes">

</section>

<!-- /.notes -->

<!-- Package usage examples. -->

<section class="examples">

## Examples

<!-- eslint no-undef: "error" -->

```javascript
var isLineStyle = require( '@stdlib/plot/base/assert/is-line-style' );

var bool = isLineStyle( '-' );
// returns true

bool = isLineStyle( '--' );
// returns true

bool = isLineStyle( '' );
// returns false

bool = isLineStyle( 'foo' );
// returns false
```

</section>

<!-- /.examples -->

<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="references">

</section>

<!-- /.references -->

<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

<section class="related">

</section>

<!-- /.related -->

<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="links">

[@stdlib/plot/base/line-styles]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/plot/base/line-styles

</section>

<!-- /.links -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2025 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 pkg = require( './../package.json' ).name;
var isLineStyle = require( './../lib' );


// MAIN //

bench( 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 = isLineStyle( 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();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

{{alias}}( value )
Tests if an input value is a supported line style.

Parameters
----------
value: any
Value to test.

Returns
-------
bool: boolean
Boolean indicating if an input value is a supported line style.

Examples
--------
> var bool = {{alias}}( '-' )
true
> bool = {{alias}}( '--' )
true
> bool = {{alias}}( '' )
false
> bool = {{alias}}( 'beep' )
false

See Also
--------

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* @license Apache-2.0
*
* Copyright (c) 2025 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 supported line style.
*
* @param v - value to test
* @returns boolean indicating whether an input value is a supported line style
*
* @example
* var bool = isLineStyle( '-' );
* // returns true
*
* bool = isLineStyle( '--' );
* // returns true
*
* bool = isLineStyle( 'bar' );
* // returns false
*
* bool = isLineStyle( 'foo' );
* // returns false
*/
declare function isLineStyle( v: any ): boolean;

Check warning on line 40 in lib/node_modules/@stdlib/plot/base/assert/is-line-style/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type


// EXPORTS //

export = isLineStyle;
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* @license Apache-2.0
*
* Copyright (c) 2025 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 isLineStyle = require( './index' );


// TESTS //

// The function returns a boolean...
{
isLineStyle( '--' ); // $ExpectType boolean
isLineStyle( 'foo' ); // $ExpectType boolean
}

// The compiler throws an error if the function is provided an unsupported number of arguments...
{
isLineStyle(); // $ExpectError
isLineStyle( undefined, 123 ); // $ExpectError
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2025 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 isLineStyle = require( './../lib' );

var bool = isLineStyle( '-' );
console.log( bool );
// => true

bool = isLineStyle( '--' );
console.log( bool );
// => true

bool = isLineStyle( '' );
console.log( bool );
// => false

bool = isLineStyle( 'foo' );
console.log( bool );
// => false
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2025 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 supported line style.
*
* @module @stdlib/plot/base/assert/is-line-style
*
* @example
* var isLineStyle = require( '@stdlib/plot/base/assert/is-line-style' );
*
* var bool = isLineStyle( '-' );
* // returns true
*
* bool = isLineStyle( '--' );
* // returns true
*
* bool = isLineStyle( 'bar' );
* // returns false
*
* bool = isLineStyle( 'foo' );
* // returns false
*/

// MODULES //

var main = require( './main.js' );


// EXPORTS //

module.exports = main;
Loading
Loading