@road-signs/zw
v0.1.1
Published
Zimbabwe road signs — TypeScript registry, inline SVGs, and image assets
Maintainers
Readme
@road-signs/zw
Road signs for Zimbabwe — a TypeScript registry with most signs' artwork inlined as SVG, plus typed lookup helpers.
Install
npm install @road-signs/zwAt a glance
| | |
| ------------------- | ----------------------------------------------------- |
| Signs | 322 |
| With vector artwork | 321 |
| Categories | information, prohibitory, warning |
| Standard | British-derived (Road Traffic Act, left-hand traffic) |
| Regulator | Traffic Safety Council |
| Drive side | left-hand |
| Language(s) | English |
Usage
import { signs, getSign, getSignByCode, getSignsByCategory } from '@road-signs/zw';
signs; // the whole registry
getSign('crossroad-ahead-crossroad-ahead'); // by slug id
getSignByCode('crossroad-ahead'); // by official code
getSignsByCategory('information'); // by categoryEach sign carries its own artwork, so nothing else has to be copied or served:
const sign = getSign('crossroad-ahead-crossroad-ahead')!;
sign.svg; // inline, SVGO-optimised SVG markup1 of these signs carry inline artwork. They have no usable vector source — either none was published upstream, or the only artwork is a monochrome trace that renders as a black shape. Vector sources for Zimbabwe are welcome: see the coverage notes.
sign.assetsholds paths into this repo's build-timeassets/tree. That directory is ~16GB across all countries and is not published — render fromsign.svginstead.
Sources
Links
License
MIT © Karl Norling
