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

@entur/utils

Package Overview
Dependencies
Maintainers
13
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@entur/utils - npm Package Compare versions

Comparing version 0.2.9 to 0.3.0

dist/useOnMount.d.ts

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

# [0.3.0](https://bitbucket.org/enturas/design-system/compare/@entur/utils@0.2.9...@entur/utils@0.3.0) (2020-10-09)
### Features
- add useOnMount hook ([0f1fc26](https://bitbucket.org/enturas/design-system/commits/0f1fc2658a1263179be80b656828cf6373834702))
## [0.2.9](https://bitbucket.org/enturas/design-system/compare/@entur/utils@0.2.8...@entur/utils@0.2.9) (2020-06-17)

@@ -8,0 +14,0 @@

1

dist/index.d.ts
export * from './debounce';
export * from './useRandomId';
export * from './useOnMount';
export * from './warnAboutMissingStyles';

15

dist/utils.cjs.development.js

@@ -29,5 +29,13 @@ 'use strict';

var packagesToCheck =
/*#__PURE__*/
new Set();
function useOnMount(callback) {
var hasRun = React.useRef(false);
React.useEffect(function () {
if (!hasRun.current) {
hasRun.current = true;
callback();
}
}, [callback]);
}
var packagesToCheck = /*#__PURE__*/new Set();
var checkTimeoutId;

@@ -69,4 +77,5 @@

exports.debounce = debounce;
exports.useOnMount = useOnMount;
exports.useRandomId = useRandomId;
exports.warnAboutMissingStyles = warnAboutMissingStyles;
//# sourceMappingURL=utils.cjs.development.js.map

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=(e=require("react"))&&"object"==typeof e&&"default"in e?e.default:e;require("tiny-warning"),exports.debounce=function(e,r){var t;return function(){for(var n=arguments.length,u=new Array(n),o=0;o<n;o++)u[o]=arguments[o];clearTimeout(t),t=setTimeout((function(){return e.apply(void 0,u)}),r)}},exports.useRandomId=function(e){return e+"-"+r.useRef(String(Math.random()).substring(2)).current},exports.warnAboutMissingStyles=function(){};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=(e=require("react"))&&"object"==typeof e&&"default"in e?e.default:e;require("tiny-warning"),exports.debounce=function(e,t){var r;return function(){for(var n=arguments.length,u=new Array(n),o=0;o<n;o++)u[o]=arguments[o];clearTimeout(r),r=setTimeout((function(){return e.apply(void 0,u)}),t)}},exports.useOnMount=function(e){var r=t.useRef(!1);t.useEffect((function(){r.current||(r.current=!0,e())}),[e])},exports.useRandomId=function(e){return e+"-"+t.useRef(String(Math.random()).substring(2)).current},exports.warnAboutMissingStyles=function(){};
//# sourceMappingURL=utils.cjs.production.min.js.map

@@ -23,5 +23,13 @@ import React from 'react';

var packagesToCheck =
/*#__PURE__*/
new Set();
function useOnMount(callback) {
var hasRun = React.useRef(false);
React.useEffect(function () {
if (!hasRun.current) {
hasRun.current = true;
callback();
}
}, [callback]);
}
var packagesToCheck = /*#__PURE__*/new Set();
var checkTimeoutId;

@@ -62,3 +70,3 @@

export { debounce, useRandomId, warnAboutMissingStyles };
export { debounce, useOnMount, useRandomId, warnAboutMissingStyles };
//# sourceMappingURL=utils.esm.js.map
{
"name": "@entur/utils",
"version": "0.2.9",
"version": "0.3.0",
"license": "EUPL-1.2",

@@ -32,3 +32,3 @@ "main": "dist/index.js",

},
"gitHead": "3a208d5a7728adceb92b3f53c460f0a6d8f31051"
"gitHead": "eac1b4d7beec09ac6b5eb132e25dc999b68abe08"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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