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

ng-intercom

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-intercom - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

src/index.ts

18

package.json
{
"name": "ng-intercom",
"version": "0.0.2",
"version": "0.1.0",
"description": "An Intercom wrapper for Angular",
"main": "intercom.ts",
"main": "index",
"repository": {

@@ -15,2 +15,5 @@ "type": "git",

"author": "scott-wyatt",
"contributors": [
"Wilson Hobbs <wilsonhobbs1@gmail.com> (https://www.wilsonhobbs.com/)"
],
"license": "MIT",

@@ -21,9 +24,12 @@ "bugs": {

"homepage": "https://github.com/CaliStyle/angular2-intercom#readme",
"dependencies": {
"@angular/core": "^2.4.8"
"peerDependencies": {
"@angular/core": "*"
},
"devDependencies": {
"typescript": "^2.1.6"
"@angular/core": "^4.0.0-rc.2",
"rxjs": "^5.2.0",
"typescript": "^2.2.0",
"zone.js": "^0.7.7"
},
"typings": "./ng-intercom.d.ts"
"typings": "./index.d.ts"
}
# ng-intercom
This is an Intercom wrapper for Angular ^2 with dependency injection for universal applications.
This is an Intercom wrapper for Angular 2+ with dependency injection for universal applications.
It supports all intercom methods.
## Installation
This package is on NPM, so just run `npm install ng-intercom`.
## Configuration
```ts
// Bootstrap
// Add the module
import { BROWSER_INTERCOM_PROVIDERS } from './ng-intercom/ng-intercom';
import { IntercomModule } from 'ng-intercom';
import { AppComponent } from './app';
bootstrap(AppComponent, [
...BROWSER_INTERCOM_PROVIDERS
])
.catch(err => console.error(err));
@NgModule({
imports: [
IntercomModule.forRoot()
]
})
export class AppModule{}

@@ -26,3 +32,3 @@ ```

...
import { Intercom } from './ng-intercom/ng-intercom';
import { Intercom } from 'ng-intercom';

@@ -29,0 +35,0 @@ @Component({

import { IntercomBrowser } from './intercom.browser'
import { Intercom, IntercomEnvironment } from './intercom'
import { provide } from '@angular/core'

@@ -6,0 +5,0 @@ export const BROWSER_INTERCOM_PROVIDERS = [

@@ -1,15 +0,14 @@

export class IntercomBrowser {
init (data) {
(<any> window).Intercom("boot", data);
init(data) {
(<any>window).Intercom("boot", data);
}
boot (data) {
(<any> window).Intercom("boot", data);
boot(data) {
(<any>window).Intercom("boot", data);
}
update (data) {
(<any> window).Intercom("update", data);
update(data) {
(<any>window).Intercom("update", data);
}
shutdown () {
(<any> window).Intercom("shutdown");
shutdown() {
(<any>window).Intercom("shutdown");
}
}
export class IntercomNode {
init (data) {
init(data: object) {
// throw new Error('Error init IntercomNode')
}
boot (data) {
boot(data: object) {
// throw new Error('Error boot IntercomNode')
}
update (data) {
update(data: object) {
// throw new Error('Error update IntercomNode')
}
shutdown () {
shutdown() {
// throw new Error('Error shutdown IntercomNode')
}
}

@@ -21,16 +21,16 @@ import { Injectable } from '@angular/core';

export class Intercom {
constructor(public intercom: IntercomEnvironment){}
constructor(public intercom: IntercomEnvironment) { }
init(data){
init(data: Object) {
return this.intercom.init(data);
}
boot(data) {
boot(data: Object) {
return this.intercom.boot(data);
}
update (data) {
update(data: Object) {
return this.intercom.update(data);
}
shutdown () {
shutdown() {
return this.intercom.shutdown();
}
}

@@ -1,6 +0,4 @@

import { IntercomNode } from './intercom.node'
import { Intercom, IntercomEnvironment} from './intercom'
import { IntercomNode } from './intercom.node';
import { Intercom, IntercomEnvironment } from './intercom';
import { provide } from '@angular/core'
export const NODE_INTERCOM_PROVIDERS = [

@@ -7,0 +5,0 @@ IntercomNode,

@@ -16,4 +16,4 @@ {

},
"files": [
"ng-intercom.ts"
"include": [
"src/*.ts"
],

@@ -23,2 +23,2 @@ "exclude": [

]
}
}
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