type-samples

Samples for all data types

Usage no npm install needed!

<script type="module">
  import typeSamples from 'https://cdn.skypack.dev/type-samples';
</script>

README

This package contains samples of as many javascript data types as possible along with the groups they belong to. The samples can be used to write unit tests for example.

For example, the number 1 belongs to the groups number, positive and strictlyPositive.

{
    value: 1,
    name: '1',
    isNumber: true,
    isPositive: true,
    isStrictlyPositive: true
}

Of course, the samples need to be updated with new JavaScript versions and groups can to be added by the community through pull requests.