How to use extract-domain - 10 common examples

To help you get started, we’ve selected a few extract-domain examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github infrastructure-components / infrastructure-components / src / soa / soa-plugin.ts View on Github external
`);



            };




            const invalidateCloudFrontCache = () => {
                if (deployedDomain && props.parserMode === PARSER_MODES.MODE_DEPLOY) {
                    require("../../../infrastructure-scripts/dist/infra-comp-utils/sls-libs").invalidateCloudFrontCache(domain);
                }
            }

            const hostedZoneName = domain !== undefined ? extractDomain(domain.toString()) : {};


            /** post build function to write to the .env file that the domain has been deployed */
            const writeDomainEnv = () => {
                //console.log("check for >>writeDomainEnv<<");

                // we only write to the .env file when we are in domain mode, i.e. this script creates the domain
                // and we did not yet deployed the domain previously
                if (!deployedDomain && props.parserMode === PARSER_MODES.MODE_DOMAIN) {
                    require('fs').appendFileSync(
                        path.join(
                            require("../../../infrastructure-scripts/dist/infra-comp-utils/system-libs").currentAbsolutePath(),
                            ".env"),
                        `\nDOMAIN_${props.stage}=TRUE`
                    );
                }
github infrastructure-components / infrastructure-components / src / spa / spa-plugin.ts View on Github external
// check whether we already created the domain of this environment
            const deployedDomain = process.env[`DOMAIN_${props.stage}`] !== undefined;


            const domain = childConfigs.map(config => config.domain).reduce((result, domain) => result !== undefined ? result : domain, undefined);
            const certArn = childConfigs.map(config => config.certArn).reduce((result, certArn) => result !== undefined ? result : certArn, undefined);

            const invalidateCloudFrontCache = () => {
                if (deployedDomain && props.parserMode === PARSER_MODES.MODE_DEPLOY) {
                    require("../../../infrastructure-scripts/dist/infra-comp-utils/sls-libs").invalidateCloudFrontCache(domain);
                }
            }

            const hostedZoneName = domain !== undefined ? extractDomain(domain.toString()) : {};


            /** post build function to write to the .env file that the domain has been deployed */
            const writeDomainEnv = () => {
                //console.log("check for >>writeDomainEnv<<");

                // we only write to the .env file when we are in domain mode, i.e. this script creates the domain
                // and we did not yet deployed the domain previously
                if (!deployedDomain && props.parserMode === PARSER_MODES.MODE_DOMAIN) {
                    require('fs').appendFileSync(
                        path.join(
                            require("../../../infrastructure-scripts/dist/infra-comp-utils/system-libs").currentAbsolutePath(),
                            ".env"),
                        `\nDOMAIN_${props.stage}=TRUE`
                    );
                }
github buttercup / buttercup-mobile / source / shared / entries.js View on Github external
const newEntries = archive.findEntriesByMeta("url", /.+/).filter(entry => {
            const entryURL = entry.getMeta("url");
            const entryDomain = extractDomain(entryURL);
            return (
                entryDomain.length > 0 &&
                (entryDomain === extractDomain(url) || entryDomain === url) &&
                entry.isInTrash() === false
            );
        });
        entries.push(
github buttercup / buttercup-browser-extension / source / background / library / archives.js View on Github external
const newEntries = archive.findEntriesByMeta("url", /.+/).filter(entry => {
                const entryURL = entry.getMeta("url");
                const entryDomain = extractDomain(entryURL);
                return entryDomain.length > 0 && entryDomain === extractDomain(url) && entry.isInTrash() === false;
            });
            entries.push(
github selbekk / react-christmas / components / related-links.js View on Github external
{links.map(link => (
          <li>
            
              
                <title>{link.title}</title>
                {extractDomain(link.link)}
                {link.body}
              
            
          </li>
        ))}
github buttercup / buttercup-desktop / src / renderer / components / archive / entry-icon.js View on Github external
componentDidMount() {
    const { entry } = this.props;
    if (!entry) {
      return;
    }
    const url = getEntryURL(entry);
    const domain = url ? extractDomain(url) : null;
    this.setState({
      icon: getIconFilename(domain)
    });
  }
github buttercup / buttercup-browser-extension / source / background / library / archives.js View on Github external
const newEntries = archive.findEntriesByMeta("url", /.+/).filter(entry => {
                const entryURL = entry.getMeta("url");
                const entryDomain = extractDomain(entryURL);
                return entryDomain.length > 0 && entryDomain === extractDomain(url) && entry.isInTrash() === false;
            });
            entries.push(
github buttercup / buttercup-mobile / source / shared / entries.js View on Github external
const newEntries = archive.findEntriesByMeta("url", /.+/).filter(entry => {
            const entryURL = entry.getMeta("url");
            const entryDomain = extractDomain(entryURL);
            return (
                entryDomain.length > 0 &&
                (entryDomain === extractDomain(url) || entryDomain === url) &&
                entry.isInTrash() === false
            );
        });
        entries.push(
github microlinkhq / sdk / packages / react-microlink / src / components / Card / CardContent.js View on Github external
export default ({title, description, url, cardSize, className}) =&gt; (
  <content>
    <title>
      &lt;CardText lines={1}&gt;{title}&lt;/CardText&gt;
    </title>
    
      {description}
    
    
      {extractDomain(url)}
    
  </content>
)
github buttercup / buttercup-browser-extension / source / shared / library / icons.js View on Github external
export function getIconForURL(url) {
    const domain = extractDomain(url);
    const filepath = getIconFilename(domain);
    const filename = path.basename(filepath);
    return getExtensionURL(`site-icons/images/${filename}`);
}

extract-domain

Extract domain name from URL

MIT
Latest version published 9 months ago

Package Health Score

58 / 100
Full package analysis

Popular extract-domain functions