initial public commit
This commit is contained in:
1
dist-demo/dist-browser/constants.d.ts
vendored
Normal file
1
dist-demo/dist-browser/constants.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const __dirname: string;
|
||||
2
dist-demo/dist-browser/hashTwt.d.ts
vendored
Normal file
2
dist-demo/dist-browser/hashTwt.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { Twt } from './types.ts';
|
||||
export default function hashTwt(twt: Twt): string;
|
||||
5
dist-demo/dist-browser/index.d.ts
vendored
Normal file
5
dist-demo/dist-browser/index.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export type * from './types.ts';
|
||||
export { default as hashTwt } from './hashTwt.ts';
|
||||
export { default as loadAndParseTwtxtFile } from './loadAndParseTwtxt.ts';
|
||||
export { default as parseTwtxt } from './parseTwtxt.ts';
|
||||
export { base32Encode } from './utils.ts';
|
||||
14
dist-demo/dist-browser/loadAndParseTwtxt.d.ts
vendored
Normal file
14
dist-demo/dist-browser/loadAndParseTwtxt.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
export default function loadAndParseTwtxtFile(url?: string): Promise<{
|
||||
lastModified: string;
|
||||
following: import('./types.ts').Twttr[];
|
||||
metadata: import('./types.ts').Metadata;
|
||||
twts: {
|
||||
content: string;
|
||||
created: string;
|
||||
createdUTC: string;
|
||||
hash: string;
|
||||
replyHash: string | undefined;
|
||||
replyNick: string | undefined;
|
||||
replyUrl: string | undefined;
|
||||
}[];
|
||||
}>;
|
||||
18
dist-demo/dist-browser/parseTwtxt.d.ts
vendored
Normal file
18
dist-demo/dist-browser/parseTwtxt.d.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Metadata, Twttr } from './types.ts';
|
||||
/**
|
||||
* @param twtxt
|
||||
* @returns object containing: following, metadata, twts
|
||||
*/
|
||||
export default function parseTwtxt(twtxt: string): {
|
||||
following: Twttr[];
|
||||
metadata: Metadata;
|
||||
twts: {
|
||||
content: string;
|
||||
created: string;
|
||||
createdUTC: string;
|
||||
hash: string;
|
||||
replyHash: string | undefined;
|
||||
replyNick: string | undefined;
|
||||
replyUrl: string | undefined;
|
||||
}[];
|
||||
};
|
||||
3401
dist-demo/dist-browser/twtxt-lib.js
Normal file
3401
dist-demo/dist-browser/twtxt-lib.js
Normal file
File diff suppressed because it is too large
Load Diff
1
dist-demo/dist-browser/twtxt-lib.js.map
Normal file
1
dist-demo/dist-browser/twtxt-lib.js.map
Normal file
File diff suppressed because one or more lines are too long
2318
dist-demo/dist-browser/twtxt-lib.min.js
vendored
Normal file
2318
dist-demo/dist-browser/twtxt-lib.min.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
dist-demo/dist-browser/twtxt-lib.min.js.map
Normal file
1
dist-demo/dist-browser/twtxt-lib.min.js.map
Normal file
File diff suppressed because one or more lines are too long
31
dist-demo/dist-browser/types.d.ts
vendored
Normal file
31
dist-demo/dist-browser/types.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
export interface LoadAndParseTwtxtWithCacheConfig {
|
||||
cacheKeyPrefix: string;
|
||||
onLoad?: (data: Twtxt) => void;
|
||||
user?: Twttr;
|
||||
}
|
||||
export interface Metadata {
|
||||
[key: string]: string | string[];
|
||||
}
|
||||
export interface Twt {
|
||||
avatar?: string;
|
||||
content: string;
|
||||
created: string;
|
||||
createdUTC: string;
|
||||
hash?: string;
|
||||
nick?: string;
|
||||
noDom?: boolean;
|
||||
replyHash?: string;
|
||||
replyNick?: string;
|
||||
replyUrl?: string;
|
||||
url?: string;
|
||||
}
|
||||
export interface Twttr {
|
||||
avatar?: string;
|
||||
nick: string;
|
||||
url: string;
|
||||
}
|
||||
export interface Twtxt {
|
||||
following: Twttr[];
|
||||
metadata: Metadata;
|
||||
twts: Twt[];
|
||||
}
|
||||
2
dist-demo/dist-browser/utils.d.ts
vendored
Normal file
2
dist-demo/dist-browser/utils.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare const base32Encode: (payload: string | Uint8Array<ArrayBufferLike>) => any;
|
||||
export declare const getValueOrFirstEntry: (value: unknown | unknown[]) => any;
|
||||
Reference in New Issue
Block a user