Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-amplify/core

Package Overview
Dependencies
Maintainers
10
Versions
2080
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/core

Core category of aws-amplify

  • 1.0.24-beta.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
911K
decreased by-3.57%
Maintainers
10
Weekly downloads
 
Created

What is @aws-amplify/core?

@aws-amplify/core is a foundational library for the AWS Amplify ecosystem. It provides essential utilities and functionalities that support the other Amplify libraries, such as configuration management, logging, and event handling.

What are @aws-amplify/core's main functionalities?

Configuration Management

This feature allows you to configure various AWS services used by your application. The configuration object can include settings for authentication, storage, API, and more.

const Amplify = require('@aws-amplify/core');

Amplify.configure({
  Auth: {
    identityPoolId: 'XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab',
    region: 'XX-XXXX-X',
    userPoolId: 'XX-XXXX-X_abcd1234',
    userPoolWebClientId: 'XX-XXXX-X_abcd1234'
  }
});

Logging

The logging feature provides a way to log messages at different levels (log, info, warn, error). This can be useful for debugging and monitoring your application.

const { Logger } = require('@aws-amplify/core');

const logger = new Logger('MyLogger');

logger.log('This is a log message');
logger.info('This is an info message');
logger.warn('This is a warning message');
logger.error('This is an error message');

Event Handling

Event handling allows you to listen for and dispatch events within your application. This can be useful for responding to changes in authentication state, data updates, and other events.

const { Hub } = require('@aws-amplify/core');

Hub.listen('auth', (data) => {
  const { payload } = data;
  console.log('A new auth event has happened: ', payload);
});

Hub.dispatch('auth', { event: 'signIn', data: { username: 'user1' }, message: 'User signed in' });

Other packages similar to @aws-amplify/core

FAQs

Package last updated on 14 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc