Socket
Socket
Sign inDemoInstall

nativescript-vibrate

Package Overview
Dependencies
0
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.3 to 3.0.0

5

CHANGELOG.md
# Change Log
## [v3.0.0](https://github.com/bazzite/nativescript-vibrate/tree/v3.0.0) (2019-11-21)
- Bump dependencies to NativeScript 6
- Delay getting the service on Android until needed ([#85](https://github.com/bazzite/nativescript-vibrate/pull/85)), (thanks to [EddyVerbruggen](https://github.com/EddyVerbruggen))
## [v2.1.3](https://github.com/bazzite/nativescript-vibrate/tree/v2.1.3) (2019-03-14)

@@ -4,0 +9,0 @@

20

package.json
{
"name": "nativescript-vibrate",
"version": "2.1.3",
"version": "3.0.0",
"description": "A vibrate NativeScript plugin for Android and iOS",

@@ -9,8 +9,8 @@ "main": "vibrate",

"platforms": {
"android": "5.2.0",
"ios": "5.2.0"
"android": "6.0.0",
"ios": "6.0.0"
}
},
"scripts": {
"tsc": "tsc",
"tsc": "npm i && tsc",
"build": "npm run tsc && npm run build.native",

@@ -23,4 +23,4 @@ "build.native": "node scripts/build-native.js",

"plugin.tscwatch": "npm run tsc -- -w",
"demo.ios": "npm run tsc && cd ../demo && tns run ios --syncAllFiles --emulator",
"demo.android": "npm run tsc && cd ../demo && tns run android --syncAllFiles --emulator",
"demo.ios": "npm run tsc && cd ../demo && tns run ios",
"demo.android": "npm run tsc && cd ../demo && tns run android",
"demo.reset": "cd ../demo && npx rimraf -- hooks node_modules platforms package-lock.json",

@@ -53,9 +53,9 @@ "plugin.prepare": "npm run build && cd ../demo && tns plugin remove nativescript-vibrate && tns plugin add ../src",

"devDependencies": {
"tns-core-modules": "^5.2.0",
"tns-platform-declarations": "^5.2.0",
"typescript": "~3.3.3",
"tns-core-modules": "~6.1.2",
"tns-platform-declarations": "~6.1.2",
"typescript": "~3.4.5",
"prompt": "^1.0.0",
"rimraf": "^2.6.3",
"tslint": "^5.14.0",
"semver": "^5.6.0"
"semver": "^6.1.2"
},

@@ -62,0 +62,0 @@ "dependencies": {},

@@ -7,3 +7,2 @@ [![Bazzite Project](https://img.shields.io/badge/Bazzite-project-blue.svg)](https://www.bazzite.com/docs/nativescript-vibrate?utm_source=github&utm_medium=readme&utm_campaign=nativescript-vibrate)

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fbazzite%2Fnativescript-vibrate.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fbazzite%2Fnativescript-vibrate?ref=badge_shield)
[![Greenkeeper badge](https://badges.greenkeeper.io/bazzite/nativescript-vibrate.svg)](https://greenkeeper.io/)

@@ -83,8 +82,7 @@ # NativeScript Vibrate ![apple](https://cdn3.iconfinder.com/data/icons/picons-social/57/16-apple-32.png) ![android](https://cdn4.iconfinder.com/data/icons/logos-3/228/android-32.png)

If you want extra details of how to configure and use this plugin, the full documentation is available at [https://www.bazzite.com/docs/nativescript-vibrate][documentation].
- 📄 If you want **extra details** of how to configure and use this plugin, the full documentation is available at [https://www.bazzite.com/docs/nativescript-vibrate][documentation].
- 🐞 For **Bug reports** or **Feature requests**, use the [Issues section][issues].
- 💬 For **questions**, go to [https://spectrum.chat/bazzite/open-source][spectrum-chat].
- 🚀 You may also want to [follow the company supporting this project on Twitter][twitter].
For questions and support, use the [Issues section][issues].
You may also want to [follow the company supporting this project on Twitter][twitter].
### Professional Support

@@ -106,3 +104,3 @@

![](https://ga-beacon.appspot.com/UA-130293414-2/nativescript/nativescript-version-tracking?pixel)
![](https://ga-beacon.appspot.com/UA-65885578-17/bazzite/nativescript-vibrate?pixel)

@@ -117,2 +115,3 @@

[twitter]: https://twitter.com/BazziteTech
[spectrum-chat]: https://spectrum.chat/bazzite/login?r=https://spectrum.chat/bazzite/open-source
[bazzite-website]: https://www.bazzite.com?utm_source=github&utm_medium=readme&utm_campaign=nativescript-vibrate

@@ -119,0 +118,0 @@ [contact-page]: https://www.bazzite.com/contact?utm_source=github&utm_medium=readme&utm_campaign=nativescript-vibrate

import { Common } from './vibrate.common';
export declare class Vibrate extends Common {
constructor();
private vibratorService;
hasVibrator(): boolean;
vibrate(param?: number | number[], repeat?: number): void;
cancel(): void;
private getVibratorService;
}

@@ -8,8 +8,6 @@ "use strict";

function Vibrate() {
var _this = _super.call(this) || this;
_this.service = app.android.context.getSystemService(android.content.Context.VIBRATOR_SERVICE);
return _this;
return _super !== null && _super.apply(this, arguments) || this;
}
Vibrate.prototype.hasVibrator = function () {
return this.service.hasVibrator();
return this.getVibratorService().hasVibrator();
};

@@ -21,3 +19,3 @@ Vibrate.prototype.vibrate = function (param, repeat) {

if (typeof param === "number") {
this.service.vibrate(param);
this.getVibratorService().vibrate(param);
}

@@ -28,3 +26,3 @@ else {

param.forEach(function (value, index) { pattern_1[index] = value; });
this.service.vibrate(pattern_1, repeat);
this.getVibratorService().vibrate(pattern_1, repeat);
}

@@ -34,4 +32,10 @@ }

Vibrate.prototype.cancel = function () {
this.service.cancel();
this.getVibratorService().cancel();
};
Vibrate.prototype.getVibratorService = function () {
if (!this.vibratorService) {
this.vibratorService = app.android.context.getSystemService(android.content.Context.VIBRATOR_SERVICE);
}
return this.vibratorService;
};
return Vibrate;

@@ -38,0 +42,0 @@ }(vibrate_common_1.Common));

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc