Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/safrmo/data-uri-snippets
NPM package for commonly-used data URIs
https://github.com/safrmo/data-uri-snippets
Last synced: 6 days ago
JSON representation
NPM package for commonly-used data URIs
- Host: GitHub
- URL: https://github.com/safrmo/data-uri-snippets
- Owner: SaFrMo
- Created: 2017-05-24T12:44:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-26T19:17:36.000Z (over 7 years ago)
- Last Synced: 2024-10-11T05:11:05.378Z (about 1 month ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## What
Dictionary of commonly-used data URIs. Part of the [Phaser Component Library](https://github.com/SaFrMo/phaser-component-library).## How
`npm install data-uri-snippets --save`
Then, in your JS:
```
import snippets from 'data-uri-snippets'// white 1x1 pixel
var img = new Image()
img.src = snippets.white1x1png
```## Values
* `white1x1` - 1x1 opaque white gif (35 bytes)
* `white1x1png` - 1x1 opaque white png (67 bytes)## Sources
* [1x1 gif and png](http://proger.i-forge.net/%D0%9A%D0%BE%D0%BC%D0%BF%D1%8C%D1%8E%D1%82%D0%B5%D1%80/[20121112]%20The%20smallest%20transparent%20pixel.html)