mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[metascraper] Add types for metascraper (#46878)
This commit is contained in:
parent
c89b0fbbbd
commit
40c72bd5eb
10
types/metascraper-address/index.d.ts
vendored
Normal file
10
types/metascraper-address/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for metascraper-address 1.0
|
||||
// Project: https://github.com/goodhood-eu/metascraper-address#readme
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
9
types/metascraper-address/metascraper-address-tests.ts
Normal file
9
types/metascraper-address/metascraper-address-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperAddress = require('metascraper-address');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperAddress()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-address/package.json
Normal file
6
types/metascraper-address/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-address/tsconfig.json
Normal file
23
types/metascraper-address/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-address-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-address/tslint.json
Normal file
1
types/metascraper-address/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
10
types/metascraper-amazon/index.d.ts
vendored
Normal file
10
types/metascraper-amazon/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for metascraper-amazon 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-amazon
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
9
types/metascraper-amazon/metascraper-amazon-tests.ts
Normal file
9
types/metascraper-amazon/metascraper-amazon-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperAmazon = require('metascraper-amazon');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperAmazon()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-amazon/package.json
Normal file
6
types/metascraper-amazon/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-amazon/tsconfig.json
Normal file
23
types/metascraper-amazon/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-amazon-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-amazon/tslint.json
Normal file
1
types/metascraper-amazon/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
10
types/metascraper-audio/index.d.ts
vendored
Normal file
10
types/metascraper-audio/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for metascraper-audio 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-audio
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
9
types/metascraper-audio/metascraper-audio-tests.ts
Normal file
9
types/metascraper-audio/metascraper-audio-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperAudio = require('metascraper-audio');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperAudio()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-audio/package.json
Normal file
6
types/metascraper-audio/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-audio/tsconfig.json
Normal file
23
types/metascraper-audio/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-audio-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-audio/tslint.json
Normal file
1
types/metascraper-audio/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
10
types/metascraper-author/index.d.ts
vendored
Normal file
10
types/metascraper-author/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for metascraper-author 5.14
|
||||
// Project: https://metascraper.js.org
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
9
types/metascraper-author/metascraper-author-tests.ts
Normal file
9
types/metascraper-author/metascraper-author-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperAuthor = require('metascraper-author');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperAuthor()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-author/package.json
Normal file
6
types/metascraper-author/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-author/tsconfig.json
Normal file
23
types/metascraper-author/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-author-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-author/tslint.json
Normal file
1
types/metascraper-author/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
21
types/metascraper-clearbit/index.d.ts
vendored
Normal file
21
types/metascraper-clearbit/index.d.ts
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
// Type definitions for metascraper-clearbit 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-clearbit
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import * as http from 'http';
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare namespace getData {
|
||||
interface Options {
|
||||
/** Any option provided here will passed to `got#options`. */
|
||||
gotOpts?: http.ClientRequestArgs;
|
||||
}
|
||||
}
|
||||
|
||||
declare function getData(options?: getData.Options): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
19
types/metascraper-clearbit/metascraper-clearbit-tests.ts
Normal file
19
types/metascraper-clearbit/metascraper-clearbit-tests.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperClearbit = require('metascraper-clearbit');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
const options: metascraperClearbit.Options = {
|
||||
gotOpts: {
|
||||
timeout: 10000,
|
||||
},
|
||||
};
|
||||
|
||||
metascraper([metascraperClearbit()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
|
||||
metascraper([metascraperClearbit(options)])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-clearbit/package.json
Normal file
6
types/metascraper-clearbit/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-clearbit/tsconfig.json
Normal file
23
types/metascraper-clearbit/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-clearbit-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-clearbit/tslint.json
Normal file
1
types/metascraper-clearbit/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
10
types/metascraper-date/index.d.ts
vendored
Normal file
10
types/metascraper-date/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for metascraper-date 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-date
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
9
types/metascraper-date/metascraper-date-tests.ts
Normal file
9
types/metascraper-date/metascraper-date-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperDate = require('metascraper-date');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperDate()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-date/package.json
Normal file
6
types/metascraper-date/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-date/tsconfig.json
Normal file
23
types/metascraper-date/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-date-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-date/tslint.json
Normal file
1
types/metascraper-date/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
17
types/metascraper-description/index.d.ts
vendored
Normal file
17
types/metascraper-description/index.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
// Type definitions for metascraper-description 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-description
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare namespace getData {
|
||||
interface Options {
|
||||
/** Truncate the value extracted to a maximum size (default: `300`). */
|
||||
truncateLength?: number;
|
||||
}
|
||||
}
|
||||
|
||||
declare function getData(options?: getData.Options): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
@ -0,0 +1,17 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperDescription = require('metascraper-description');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
const options: metascraperDescription.Options = {
|
||||
truncateLength: 150,
|
||||
};
|
||||
|
||||
metascraper([metascraperDescription()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
|
||||
metascraper([metascraperDescription(options)])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-description/package.json
Normal file
6
types/metascraper-description/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-description/tsconfig.json
Normal file
23
types/metascraper-description/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-description-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-description/tslint.json
Normal file
1
types/metascraper-description/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
10
types/metascraper-iframe/index.d.ts
vendored
Normal file
10
types/metascraper-iframe/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for metascraper-iframe 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-iframe
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
9
types/metascraper-iframe/metascraper-iframe-tests.ts
Normal file
9
types/metascraper-iframe/metascraper-iframe-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperIframe = require('metascraper-iframe');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperIframe()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-iframe/package.json
Normal file
6
types/metascraper-iframe/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-iframe/tsconfig.json
Normal file
23
types/metascraper-iframe/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-iframe-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-iframe/tslint.json
Normal file
1
types/metascraper-iframe/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
10
types/metascraper-image/index.d.ts
vendored
Normal file
10
types/metascraper-image/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for metascraper-image 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-image
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
9
types/metascraper-image/metascraper-image-tests.ts
Normal file
9
types/metascraper-image/metascraper-image-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperImage = require('metascraper-image');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperImage()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-image/package.json
Normal file
6
types/metascraper-image/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-image/tsconfig.json
Normal file
23
types/metascraper-image/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-image-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-image/tslint.json
Normal file
1
types/metascraper-image/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
10
types/metascraper-lang/index.d.ts
vendored
Normal file
10
types/metascraper-lang/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for metascraper-lang 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-lang
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
9
types/metascraper-lang/metascraper-lang-tests.ts
Normal file
9
types/metascraper-lang/metascraper-lang-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperLang = require('metascraper-lang');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperLang()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-lang/package.json
Normal file
6
types/metascraper-lang/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-lang/tsconfig.json
Normal file
23
types/metascraper-lang/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-lang-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-lang/tslint.json
Normal file
1
types/metascraper-lang/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
34
types/metascraper-logo-favicon/index.d.ts
vendored
Normal file
34
types/metascraper-logo-favicon/index.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
// Type definitions for metascraper-logo-favicon 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-logo-favicon
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.5
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import * as http from 'http';
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare namespace getData {
|
||||
type PickDefaultFunction = (sizes: FaviconSize[]) => FaviconSize;
|
||||
type PickFunction = (sizes: FaviconSize[], pickDefault: PickDefaultFunction) => FaviconSize;
|
||||
|
||||
interface FaviconSize {
|
||||
rel?: string;
|
||||
href: string;
|
||||
sizes?: string;
|
||||
url: string;
|
||||
size: number;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
/** Any option provided here will passed to `got#options`. */
|
||||
gotOpts?: http.ClientRequestArgs;
|
||||
/** Truncate the value extracted to a maximum size (default: `300`). */
|
||||
pickFn?: PickFunction;
|
||||
}
|
||||
}
|
||||
|
||||
declare function getData(options?: getData.Options): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
@ -0,0 +1,25 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperLogoFavicon = require('metascraper-logo-favicon');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
const pickFn: metascraperLogoFavicon.PickFunction = (sizes, pickDefault) => {
|
||||
const appleTouchIcon = sizes.find(item => item.rel && item.rel.includes('apple'));
|
||||
return appleTouchIcon || pickDefault(sizes);
|
||||
};
|
||||
|
||||
const options: metascraperLogoFavicon.Options = {
|
||||
pickFn,
|
||||
gotOpts: {
|
||||
timeout: 10000,
|
||||
},
|
||||
};
|
||||
|
||||
metascraper([metascraperLogoFavicon()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
|
||||
metascraper([metascraperLogoFavicon(options)])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-logo-favicon/package.json
Normal file
6
types/metascraper-logo-favicon/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-logo-favicon/tsconfig.json
Normal file
23
types/metascraper-logo-favicon/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-logo-favicon-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-logo-favicon/tslint.json
Normal file
1
types/metascraper-logo-favicon/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
10
types/metascraper-logo/index.d.ts
vendored
Normal file
10
types/metascraper-logo/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for metascraper-logo 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-logo
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
9
types/metascraper-logo/metascraper-logo-tests.ts
Normal file
9
types/metascraper-logo/metascraper-logo-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperLogo = require('metascraper-logo');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperLogo()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-logo/package.json
Normal file
6
types/metascraper-logo/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-logo/tsconfig.json
Normal file
23
types/metascraper-logo/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-logo-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-logo/tslint.json
Normal file
1
types/metascraper-logo/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
42
types/metascraper-media-provider/index.d.ts
vendored
Normal file
42
types/metascraper-media-provider/index.d.ts
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
// Type definitions for metascraper-media-provider 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-media-provider
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare namespace getData {
|
||||
type OnErrorFunction = (url: string, error: Error) => void;
|
||||
type GetProxyFunction = (data: GetProxyData) => string;
|
||||
|
||||
interface GetProxyData {
|
||||
url: string;
|
||||
retryCount: number;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
/**
|
||||
* It specifies cache based on file system to be used by
|
||||
* [youtube-dl](https://github.com/microlinkhq/metascraper/blob/master/packages/metascraper-media-provider/youtube-dl).
|
||||
*/
|
||||
cacheDir?: string;
|
||||
/**
|
||||
* It will be called to determinate if a proxy should be used for
|
||||
* resolving the next request URL.
|
||||
*/
|
||||
getProxy?: GetProxyFunction;
|
||||
/** A function to be called when something wrong happens. */
|
||||
onError?: OnErrorFunction;
|
||||
/**
|
||||
* The maximum time allowed to wait until considering the request as
|
||||
* timed out. Default is `30000`.
|
||||
*/
|
||||
timeout?: number;
|
||||
/** It specifies a custom user agent. */
|
||||
userAgent?: string;
|
||||
}
|
||||
}
|
||||
|
||||
declare function getData(options?: getData.Options): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
@ -0,0 +1,30 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperMediaProvider = require('metascraper-media-provider');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
const getProxy: metascraperMediaProvider.GetProxyFunction = data => {
|
||||
return data.url;
|
||||
};
|
||||
|
||||
const onError: metascraperMediaProvider.OnErrorFunction = (url, error) => {
|
||||
url; // $ExpectType string
|
||||
error; // $ExpectType Error
|
||||
};
|
||||
|
||||
const options: metascraperMediaProvider.Options = {
|
||||
cacheDir: '/tmp/cache',
|
||||
getProxy,
|
||||
onError,
|
||||
timeout: 10000,
|
||||
userAgent: 'MyUserAgent 1.0',
|
||||
};
|
||||
|
||||
metascraper([metascraperMediaProvider()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
|
||||
metascraper([metascraperMediaProvider(options)])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-media-provider/package.json
Normal file
6
types/metascraper-media-provider/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-media-provider/tsconfig.json
Normal file
23
types/metascraper-media-provider/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-media-provider-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-media-provider/tslint.json
Normal file
1
types/metascraper-media-provider/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
10
types/metascraper-publisher/index.d.ts
vendored
Normal file
10
types/metascraper-publisher/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for metascraper-publisher 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-publisher
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperPublisher = require('metascraper-publisher');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperPublisher()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-publisher/package.json
Normal file
6
types/metascraper-publisher/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-publisher/tsconfig.json
Normal file
23
types/metascraper-publisher/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-publisher-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-publisher/tslint.json
Normal file
1
types/metascraper-publisher/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
10
types/metascraper-readability/index.d.ts
vendored
Normal file
10
types/metascraper-readability/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for metascraper-readability 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-readability
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperReadability = require('metascraper-readability');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperReadability()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-readability/package.json
Normal file
6
types/metascraper-readability/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-readability/tsconfig.json
Normal file
23
types/metascraper-readability/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-readability-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-readability/tslint.json
Normal file
1
types/metascraper-readability/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
10
types/metascraper-soundcloud/index.d.ts
vendored
Normal file
10
types/metascraper-soundcloud/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for metascraper-soundcloud 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-soundcloud
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperSoundcloud = require('metascraper-soundcloud');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperSoundcloud()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-soundcloud/package.json
Normal file
6
types/metascraper-soundcloud/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-soundcloud/tsconfig.json
Normal file
23
types/metascraper-soundcloud/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-soundcloud-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-soundcloud/tslint.json
Normal file
1
types/metascraper-soundcloud/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
14
types/metascraper-spotify/index.d.ts
vendored
Normal file
14
types/metascraper-spotify/index.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Type definitions for metascraper-spotify 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-spotify
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare namespace getData {
|
||||
function isValidUrl(config: { url: string }): boolean;
|
||||
}
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
9
types/metascraper-spotify/metascraper-spotify-tests.ts
Normal file
9
types/metascraper-spotify/metascraper-spotify-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperSpotify = require('metascraper-spotify');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperSpotify()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-spotify/package.json
Normal file
6
types/metascraper-spotify/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-spotify/tsconfig.json
Normal file
23
types/metascraper-spotify/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-spotify-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-spotify/tslint.json
Normal file
1
types/metascraper-spotify/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
10
types/metascraper-title/index.d.ts
vendored
Normal file
10
types/metascraper-title/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for metascraper-title 5.14
|
||||
// Project: https://metascraper.js.org
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
9
types/metascraper-title/metascraper-title-tests.ts
Normal file
9
types/metascraper-title/metascraper-title-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperTitle = require('metascraper-title');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperTitle()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-title/package.json
Normal file
6
types/metascraper-title/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-title/tsconfig.json
Normal file
23
types/metascraper-title/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-title-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-title/tslint.json
Normal file
1
types/metascraper-title/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
14
types/metascraper-uol/index.d.ts
vendored
Normal file
14
types/metascraper-uol/index.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Type definitions for metascraper-uol 5.14
|
||||
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-uol
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare namespace getData {
|
||||
function isValidUrl(config: { url: string }): boolean;
|
||||
}
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
9
types/metascraper-uol/metascraper-uol-tests.ts
Normal file
9
types/metascraper-uol/metascraper-uol-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperUol = require('metascraper-uol');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperUol()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-uol/package.json
Normal file
6
types/metascraper-uol/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-uol/tsconfig.json
Normal file
23
types/metascraper-uol/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-uol-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-uol/tslint.json
Normal file
1
types/metascraper-uol/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
10
types/metascraper-url/index.d.ts
vendored
Normal file
10
types/metascraper-url/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for metascraper-url 5.14
|
||||
// Project: https://metascraper.js.org
|
||||
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import metascraper = require('metascraper');
|
||||
|
||||
declare function getData(): metascraper.Rule;
|
||||
|
||||
export = getData;
|
||||
9
types/metascraper-url/metascraper-url-tests.ts
Normal file
9
types/metascraper-url/metascraper-url-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import metascraper = require('metascraper');
|
||||
import metascraperUrl = require('metascraper-url');
|
||||
|
||||
const html = 'example';
|
||||
const url = 'https://example.org';
|
||||
|
||||
metascraper([metascraperUrl()])({ html, url }).then(data => {
|
||||
data;
|
||||
});
|
||||
6
types/metascraper-url/package.json
Normal file
6
types/metascraper-url/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"metascraper": "^5.14.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
23
types/metascraper-url/tsconfig.json
Normal file
23
types/metascraper-url/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"metascraper-url-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/metascraper-url/tslint.json
Normal file
1
types/metascraper-url/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user