@douglasdl/segmentsdisplay
v1.0.8
Published
Segments Display
Downloads
50
Readme
Table of Contents
Features
- Make XMLHttpRequests from the browser
- Make http requests from node.js
- Supports the Promise API
- Intercept request and response
- Transform request and response data
- Cancel requests
- Automatic transforms for JSON data
- 🆕 Automatic data object serialization to
multipart/form-data
andx-www-form-urlencoded
body encodings - Client side support for protecting against XSRF
Browser Support
| | | | | | --- | --- | --- | --- | --- | --- | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
Installing
Package manager
Using npm:
$ npm i @douglasdl/segmentsdisplay
Using bower:
$ bower install @douglasdl/segmentsdisplay
Using yarn:
$ yarn add @douglasdl/segmentsdisplay
Using pnpm:
$ pnpm add @douglasdl/segmentsdisplay
Once the package is installed, you can import the library using import
or require
approach:
import { SegmentsDisplay } from '@douglasdl/segmentsdisplay';
Example
Note CommonJS usage In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with
require()
, use the following approach:
import { SegmentsDisplay } from '@douglasdl/segmentsdisplay';
// Render a 16 Segments Display with the character "D"
<Display16Segments
value={"D"}
size={100}
/>
TypeScript
@douglasdl/segmentsdisplay includes TypeScript definitions and a type guard for axios errors.
Resources
Credits
@douglasdl/segmentsdisplay is inspired on old electronic components and displays.