1.0.8 • Published 2 years ago
@douglasdl/segmentsdisplay v1.0.8
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-dataandx-www-form-urlencodedbody encodings - Client side support for protecting against XSRF
Browser Support
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|---|---|---|---|---|---|
| Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
Installing
Package manager
Using npm:
$ npm i @douglasdl/segmentsdisplayUsing bower:
$ bower install @douglasdl/segmentsdisplayUsing yarn:
$ yarn add @douglasdl/segmentsdisplayUsing pnpm:
$ pnpm add @douglasdl/segmentsdisplayOnce 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.





