@webex/common-timers 2.59.2 → 2.59.3-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js CHANGED
@@ -1,6 +1,6 @@
1
- const config = {
2
- root: true,
3
- extends: ['@webex/eslint-config-legacy'],
4
- };
5
-
6
- module.exports = config;
1
+ const config = {
2
+ root: true,
3
+ extends: ['@webex/eslint-config-legacy'],
4
+ };
5
+
6
+ module.exports = config;
package/README.md CHANGED
@@ -1,42 +1,42 @@
1
- # @webex/common-timers
2
-
3
- [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
4
-
5
- > Timer wrappers for the Cisco Webex JS SDK. See https://webex.github.io/webex-js-sdk/
6
-
7
- - [@webex/common-timers](#webexcommon-timers)
8
- - [Install](#install)
9
- - [Usage](#usage)
10
- - [Maintainers](#maintainers)
11
- - [Contribute](#contribute)
12
- - [License](#license)
13
-
14
- ## Install
15
-
16
- ```bash
17
- npm install --save @webex/common-timers
18
- ```
19
-
20
- ## Usage
21
-
22
- Works just like `setTimeout` and `setInterval`, but doesn't wedge a node process open.
23
-
24
- ```js
25
- import {safeSetTimeout, safeSetInterval} from '@webex/common-timers';
26
-
27
- const timer = safeSetTimeout(() => {}, 1000);
28
-
29
- const interval = safeSetInterval(() => {}, 1000);
30
- ```
31
-
32
- ## Maintainers
33
-
34
- This package is maintained by [Cisco Webex for Developers](https://developer.webex.com/).
35
-
36
- ## Contribute
37
-
38
- Pull requests welcome. Please see [CONTRIBUTING.md](https://github.com/webex/webex-js-sdk/blob/master/CONTRIBUTING.md) for more details.
39
-
40
- ## License
41
-
42
- © 2016-2020 Cisco and/or its affiliates. All Rights Reserved.
1
+ # @webex/common-timers
2
+
3
+ [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
4
+
5
+ > Timer wrappers for the Cisco Webex JS SDK. See https://webex.github.io/webex-js-sdk/
6
+
7
+ - [@webex/common-timers](#webexcommon-timers)
8
+ - [Install](#install)
9
+ - [Usage](#usage)
10
+ - [Maintainers](#maintainers)
11
+ - [Contribute](#contribute)
12
+ - [License](#license)
13
+
14
+ ## Install
15
+
16
+ ```bash
17
+ npm install --save @webex/common-timers
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ Works just like `setTimeout` and `setInterval`, but doesn't wedge a node process open.
23
+
24
+ ```js
25
+ import {safeSetTimeout, safeSetInterval} from '@webex/common-timers';
26
+
27
+ const timer = safeSetTimeout(() => {}, 1000);
28
+
29
+ const interval = safeSetInterval(() => {}, 1000);
30
+ ```
31
+
32
+ ## Maintainers
33
+
34
+ This package is maintained by [Cisco Webex for Developers](https://developer.webex.com/).
35
+
36
+ ## Contribute
37
+
38
+ Pull requests welcome. Please see [CONTRIBUTING.md](https://github.com/webex/webex-js-sdk/blob/master/CONTRIBUTING.md) for more details.
39
+
40
+ ## License
41
+
42
+ © 2016-2020 Cisco and/or its affiliates. All Rights Reserved.
package/babel.config.js CHANGED
@@ -1,3 +1,3 @@
1
- const babelConfigLegacy = require('@webex/babel-config-legacy');
2
-
3
- module.exports = babelConfigLegacy;
1
+ const babelConfigLegacy = require('@webex/babel-config-legacy');
2
+
3
+ module.exports = babelConfigLegacy;
package/dist/index.js CHANGED
@@ -6,16 +6,16 @@ _Object$defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.safeSetInterval = safeSetInterval;
8
8
  exports.safeSetTimeout = safeSetTimeout;
9
- /*!
10
- * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
9
+ /*!
10
+ * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
11
11
  */
12
12
 
13
- /**
14
- * Wrapper around setTimout which (in node) unrefs the returned timer to avoid
15
- * wedging the process open unexpectedly.
16
- * @param {Mixed} args
17
- * @protected
18
- * @returns {Timer|Number}
13
+ /**
14
+ * Wrapper around setTimout which (in node) unrefs the returned timer to avoid
15
+ * wedging the process open unexpectedly.
16
+ * @param {Mixed} args
17
+ * @protected
18
+ * @returns {Timer|Number}
19
19
  */
20
20
  function safeSetTimeout() {
21
21
  var timer = setTimeout.apply(void 0, arguments);
@@ -25,12 +25,12 @@ function safeSetTimeout() {
25
25
  return timer;
26
26
  }
27
27
 
28
- /**
29
- * Wrapper around setTimout which (in node) unrefs the returned timer to avoid
30
- * wedging the process open unexpectedly.
31
- * @param {Mixed} args
32
- * @protected
33
- * @returns {Timer|Number}
28
+ /**
29
+ * Wrapper around setTimout which (in node) unrefs the returned timer to avoid
30
+ * wedging the process open unexpectedly.
31
+ * @param {Mixed} args
32
+ * @protected
33
+ * @returns {Timer|Number}
34
34
  */
35
35
  function safeSetInterval() {
36
36
  var interval = setInterval.apply(void 0, arguments);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["safeSetTimeout","timer","setTimeout","apply","arguments","unref","safeSetInterval","interval","setInterval"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Wrapper around setTimout which (in node) unrefs the returned timer to avoid\n * wedging the process open unexpectedly.\n * @param {Mixed} args\n * @protected\n * @returns {Timer|Number}\n */\nexport function safeSetTimeout(...args) {\n const timer = setTimeout(...args);\n\n if (timer.unref) {\n timer.unref();\n }\n\n return timer;\n}\n\n/**\n * Wrapper around setTimout which (in node) unrefs the returned timer to avoid\n * wedging the process open unexpectedly.\n * @param {Mixed} args\n * @protected\n * @returns {Timer|Number}\n */\nexport function safeSetInterval(...args) {\n const interval = setInterval(...args);\n\n if (interval.unref) {\n interval.unref();\n }\n\n return interval;\n}\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,cAAcA,CAAA,EAAU;EACtC,IAAMC,KAAK,GAAGC,UAAU,CAAAC,KAAA,SAAAC,SAAA,CAAS;EAEjC,IAAIH,KAAK,CAACI,KAAK,EAAE;IACfJ,KAAK,CAACI,KAAK,EAAE;EACf;EAEA,OAAOJ,KAAK;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASK,eAAeA,CAAA,EAAU;EACvC,IAAMC,QAAQ,GAAGC,WAAW,CAAAL,KAAA,SAAAC,SAAA,CAAS;EAErC,IAAIG,QAAQ,CAACF,KAAK,EAAE;IAClBE,QAAQ,CAACF,KAAK,EAAE;EAClB;EAEA,OAAOE,QAAQ;AACjB"}
1
+ {"version":3,"names":["safeSetTimeout","timer","setTimeout","apply","arguments","unref","safeSetInterval","interval","setInterval"],"sources":["index.js"],"sourcesContent":["/*!\r\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\r\n */\r\n\r\n/**\r\n * Wrapper around setTimout which (in node) unrefs the returned timer to avoid\r\n * wedging the process open unexpectedly.\r\n * @param {Mixed} args\r\n * @protected\r\n * @returns {Timer|Number}\r\n */\r\nexport function safeSetTimeout(...args) {\r\n const timer = setTimeout(...args);\r\n\r\n if (timer.unref) {\r\n timer.unref();\r\n }\r\n\r\n return timer;\r\n}\r\n\r\n/**\r\n * Wrapper around setTimout which (in node) unrefs the returned timer to avoid\r\n * wedging the process open unexpectedly.\r\n * @param {Mixed} args\r\n * @protected\r\n * @returns {Timer|Number}\r\n */\r\nexport function safeSetInterval(...args) {\r\n const interval = setInterval(...args);\r\n\r\n if (interval.unref) {\r\n interval.unref();\r\n }\r\n\r\n return interval;\r\n}\r\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,cAAcA,CAAA,EAAU;EACtC,IAAMC,KAAK,GAAGC,UAAU,CAAAC,KAAA,SAAAC,SAAA,CAAS;EAEjC,IAAIH,KAAK,CAACI,KAAK,EAAE;IACfJ,KAAK,CAACI,KAAK,EAAE;EACf;EAEA,OAAOJ,KAAK;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASK,eAAeA,CAAA,EAAU;EACvC,IAAMC,QAAQ,GAAGC,WAAW,CAAAL,KAAA,SAAAC,SAAA,CAAS;EAErC,IAAIG,QAAQ,CAACF,KAAK,EAAE;IAClBE,QAAQ,CAACF,KAAK,EAAE;EAClB;EAEA,OAAOE,QAAQ;AACjB"}
package/jest.config.js CHANGED
@@ -1,3 +1,3 @@
1
- const config = require('@webex/jest-config-legacy');
2
-
3
- module.exports = config;
1
+ const config = require('@webex/jest-config-legacy');
2
+
3
+ module.exports = config;
package/package.json CHANGED
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "name": "@webex/common-timers",
3
- "version": "2.59.2",
4
3
  "description": "Timer wrappers to prevent wedging a process open",
5
4
  "license": "MIT",
6
5
  "main": "dist/index.js",
@@ -22,6 +21,7 @@
22
21
  "scripts": {
23
22
  "build": "yarn build:src",
24
23
  "build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps",
24
+ "deploy:npm": "yarn npm publish",
25
25
  "test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
26
26
  "test:browser": "webex-legacy-tools test --integration --unit --runner karma",
27
27
  "test:integration": "webex-legacy-tools test --integration --runner mocha",
@@ -30,15 +30,16 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@babel/core": "^7.17.10",
33
- "@webex/babel-config-legacy": "2.59.2",
34
- "@webex/eslint-config-legacy": "2.59.2",
35
- "@webex/jest-config-legacy": "2.59.2",
36
- "@webex/legacy-tools": "2.59.2",
37
- "@webex/test-helper-chai": "2.59.2",
38
- "@webex/test-helper-mocha": "2.59.2",
39
- "@webex/test-helper-mock-webex": "2.59.2",
40
- "@webex/test-helper-test-users": "2.59.2",
33
+ "@webex/babel-config-legacy": "^0.0.0",
34
+ "@webex/eslint-config-legacy": "^0.0.0",
35
+ "@webex/jest-config-legacy": "^0.0.0",
36
+ "@webex/legacy-tools": "^0.0.0",
37
+ "@webex/test-helper-chai": "^2.59.3-next.1",
38
+ "@webex/test-helper-mocha": "^2.59.3-next.1",
39
+ "@webex/test-helper-mock-webex": "^2.59.3-next.1",
40
+ "@webex/test-helper-test-users": "^2.59.3-next.1",
41
41
  "eslint": "^8.24.0",
42
42
  "prettier": "^2.7.1"
43
- }
44
- }
43
+ },
44
+ "version": "2.59.3-next.1"
45
+ }
package/process CHANGED
@@ -1 +1 @@
1
- module.exports = {browser: true};
1
+ module.exports = {browser: true};
package/src/index.js CHANGED
@@ -1,37 +1,37 @@
1
- /*!
2
- * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
- */
4
-
5
- /**
6
- * Wrapper around setTimout which (in node) unrefs the returned timer to avoid
7
- * wedging the process open unexpectedly.
8
- * @param {Mixed} args
9
- * @protected
10
- * @returns {Timer|Number}
11
- */
12
- export function safeSetTimeout(...args) {
13
- const timer = setTimeout(...args);
14
-
15
- if (timer.unref) {
16
- timer.unref();
17
- }
18
-
19
- return timer;
20
- }
21
-
22
- /**
23
- * Wrapper around setTimout which (in node) unrefs the returned timer to avoid
24
- * wedging the process open unexpectedly.
25
- * @param {Mixed} args
26
- * @protected
27
- * @returns {Timer|Number}
28
- */
29
- export function safeSetInterval(...args) {
30
- const interval = setInterval(...args);
31
-
32
- if (interval.unref) {
33
- interval.unref();
34
- }
35
-
36
- return interval;
37
- }
1
+ /*!
2
+ * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
+ */
4
+
5
+ /**
6
+ * Wrapper around setTimout which (in node) unrefs the returned timer to avoid
7
+ * wedging the process open unexpectedly.
8
+ * @param {Mixed} args
9
+ * @protected
10
+ * @returns {Timer|Number}
11
+ */
12
+ export function safeSetTimeout(...args) {
13
+ const timer = setTimeout(...args);
14
+
15
+ if (timer.unref) {
16
+ timer.unref();
17
+ }
18
+
19
+ return timer;
20
+ }
21
+
22
+ /**
23
+ * Wrapper around setTimout which (in node) unrefs the returned timer to avoid
24
+ * wedging the process open unexpectedly.
25
+ * @param {Mixed} args
26
+ * @protected
27
+ * @returns {Timer|Number}
28
+ */
29
+ export function safeSetInterval(...args) {
30
+ const interval = setInterval(...args);
31
+
32
+ if (interval.unref) {
33
+ interval.unref();
34
+ }
35
+
36
+ return interval;
37
+ }