|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
296 bytes
|
| Line | |
|---|
| 1 | "use strict"
|
|---|
| 2 |
|
|---|
| 3 | const dataURLRegexp = /^data:text\/css;base64,/i
|
|---|
| 4 |
|
|---|
| 5 | function isValid(url) {
|
|---|
| 6 | return dataURLRegexp.test(url)
|
|---|
| 7 | }
|
|---|
| 8 |
|
|---|
| 9 | function contents(url) {
|
|---|
| 10 | // "data:text/css;base64,".length === 21
|
|---|
| 11 | return Buffer.from(url.slice(21), "base64").toString()
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | module.exports = {
|
|---|
| 15 | isValid,
|
|---|
| 16 | contents,
|
|---|
| 17 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.