0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00
penpot/frontend/vendor/datefns/datefns.js
2019-08-02 20:18:05 +02:00

14 lines
417 B
JavaScript

import format from "date-fns/format";
import distanceInWordsToNow from "date-fns/distance_in_words_to_now";
if (typeof self !== "undefined") { init(self); }
else if (typeof global !== "undefined") { init(global); }
else if (typeof window !== "undefined") { init(window); }
else { throw new Error("unsupported execution environment"); }
function init(g) {
g.dateFns = {
format,
distanceInWordsToNow
};
}