Skip to content

Commit 4267f45

Browse files
committed
ts: lib/letter-avatars.js
1 parent 35d7c2f commit 4267f45

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
'use strict'
21
// external modules
3-
const crypto = require('crypto')
4-
const randomcolor = require('randomcolor')
5-
const config = require('./config')
2+
import * as crypto from "crypto";
3+
import * as randomcolor from "randomcolor";
4+
5+
import * as config from "./config";
66

77
// core
8-
exports.generateAvatar = function (name) {
8+
export function generateAvatar(name) {
99
const color = randomcolor({
1010
seed: name,
1111
luminosity: 'dark'
@@ -25,7 +25,7 @@ exports.generateAvatar = function (name) {
2525
return svg
2626
}
2727

28-
exports.generateAvatarURL = function (name, email = '', big = true) {
28+
export function generateAvatarURL(name, email = '', big = true) {
2929
let photo
3030
if (typeof email !== 'string') {
3131
email = '' + name + '@example.com'

0 commit comments

Comments
 (0)