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

@nextgis/utils

Package Overview
Dependencies
Maintainers
3
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextgis/utils - npm Package Compare versions

Comparing version 0.25.3 to 0.25.4

lib/CancelablePromise.d.ts

18

CHANGELOG.md

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

## [0.25.4](https://github.com/nextgis/nextgisweb_frontend/compare/v0.25.3...v0.25.4) (2020-02-07)
### wip
* **util:** move CancelablePromise to util ([6f7f24c](https://github.com/nextgis/nextgisweb_frontend/commit/6f7f24c8c3046731b35bae28de20ab6452dbb9c8))
### BREAKING CHANGES
* **util:** CancelablePromise has been removed from ngw-connecter. Now you should do this: import {CancelablePromise} from '@nextgis/utils;'
## [0.25.3](https://github.com/nextgis/nextgisweb_frontend/compare/v0.25.2...v0.25.3) (2020-02-07)

@@ -35,2 +51,2 @@

* **util:** Use xport { propertiesFilter } from '@nextgis/utils'; instead of Webmap.utils.propertiesFilter
* **util:** Use `import { propertiesFilter } from '@nextgis/utils';` instead of `Webmap.utils.propertiesFilter`

3

lib/index.d.ts

@@ -0,4 +1,5 @@

export * from './CancelablePromise';
export * from './Clipboard';
import * as Dom from './dom';
export declare const dom: typeof Dom;
export * from './clipboard';
export * from './events';

@@ -5,0 +6,0 @@ export * from './array';

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

!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Utils=n():t.Utils=n()}("undefined"!=typeof self?self:this,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=0)}([function(t,n,e){"use strict";e.r(n);var r={};function o(t,n,e){var r=window.document.createElement(t);return void 0!==n&&(r.className=n),e&&e.appendChild(r),r}e.r(r),e.d(r,"create",(function(){return o}));var i=function(){function t(t){t&&this.copy(t)}return t.prototype.copy=function(t){try{navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),console.log("Copied to Clipboard")}catch(t){console.log("Please copy coupon manually")}},t.prototype.copyToClipboard=function(t){var n=document.createElement("input");n.value=t;try{document.body.appendChild(n),this.copyNodeContentsToClipboard(n)}finally{document.body.removeChild(n)}},t.prototype.copyNodeContentsToClipboard=function(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")},t.copy=function(n){return new t(n)},t}(),u=function(){function t(t){this.emitter=t,this._eventsStatus={}}return t.prototype.setEventStatus=function(t,n){this._eventsStatus[t]=n},t.prototype.onLoad=function(t){var n=this,e=(Array.isArray(t)?t:[t]).map((function(t){return new Promise((function(e){if(n.getEventStatus(t))e(n);else{var r=t;n.emitter.once(r,(function(){n.setEventStatus(t,!0),e(n)}))}}))}));return Promise.all(e).then((function(){return n}))},t.prototype.getEventStatus=function(t){var n=t,e=this._eventsStatus[n];return void 0!==e&&!!e},t}();function c(t,n){return t=Array.from(t),n=Array.from(n),t.length===n.length&&t.sort().every((function(t,e){return t===n.sort()[e]}))}function f(t,n,e){if((t=String(t))===(n=String(n)))return!0;if(e&&t.toUpperCase()===n.toUpperCase())return!0;var r=("^"+t+"$").replace(/%/g,".*").replace("_",".");return null!==new RegExp(r,e?"i":"").exec(n)}var a={gt:function(t,n){return t>n},lt:function(t,n){return t<n},ge:function(t,n){return t>=n},le:function(t,n){return t<=n},eq:function(t,n){return t===n},ne:function(t,n){return t!==n},in:function(t,n){return-1!==n.indexOf(t)},notin:function(t,n){return-1===n.indexOf(t)},like:function(t,n){return f(t,n)},ilike:function(t,n){return f(t,n,!0)}};function p(t){var n=t;return 3===n.length&&"string"==typeof n[0]&&"string"==typeof n[1]}function l(t,n){var e="string"==typeof n[0]?n[0]:"all",r=function(n){if(p(n)){var e=n[0],r=n[1],o=n[2],i=a[r];return!i||i(t[e],o)}return l(t,n)},o=n.filter((function(t){return Array.isArray(t)}));return"any"===e?o.some(r):o.every(r)}function d(t){return void 0===t&&(t=0),new Promise((function(n){return setTimeout(n,t)}))}function s(t,n,e){void 0===e&&(e=!1);var r=Array.isArray(n),o=r&&[]||{};return r?e?(t=t||[],o=o.concat(t),n.forEach((function(n,r){void 0===o[r]?o[r]=n:"object"==typeof n?o[r]=s(t[r],n,e):-1===t.indexOf(n)&&o.push(n)}))):o=n:(t&&"object"==typeof t&&Object.keys(t).forEach((function(n){o[n]=t[n]})),Object.keys(n).forEach((function(r){"object"==typeof n[r]&&n[r]&&"object"==typeof t[r]&&"object"==typeof n[r]?o[r]=s(t[r],n[r],e):o[r]=n[r]}))),o}function y(t,n){void 0===n&&(n=10);var e=0;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];clearTimeout(e),e=window.setTimeout((function(){return t.apply(void 0,r)}),n)}}e.d(n,"dom",(function(){return v})),e.d(n,"bindAll",(function(){return b})),e.d(n,"fixUrlStr",(function(){return m})),e.d(n,"Clipboard",(function(){return i})),e.d(n,"Events",(function(){return u})),e.d(n,"arrayCompare",(function(){return c})),e.d(n,"operationsAliases",(function(){return a})),e.d(n,"checkIfPropertyFilter",(function(){return p})),e.d(n,"propertiesFilter",(function(){return l})),e.d(n,"sleep",(function(){return d})),e.d(n,"deepmerge",(function(){return s})),e.d(n,"debounce",(function(){return y}));var v=r;function b(t,n){t.forEach((function(t){n[t]&&(n[t]=n[t].bind(n))}))}function m(t){return t.replace(/([^:]\/)\/+/g,"$1")}}])}));
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Utils=n():t.Utils=n()}("undefined"!=typeof self?self:this,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=0)}([function(t,n,e){"use strict";e.r(n);var r={};e.r(r),e.d(r,"create",(function(){return c}));var o=function(t,n,e,r){try{t(e(r))}catch(t){n(t)}},i=function(){function t(t,n){this.onCancel=n,this._canceled=!1,this._promise=new Promise(t)}return t.resolve=function(n){return new t((function(t){return t(n)}))},t.reject=function(n){return new t((function(t,e){return e(n)}))},t.all=function(n){return new t((function(t,e){Promise.all(n).then(t).catch(e)}))},t.prototype.then=function(n,e){var r=this,i=new t((function(t,u){r._promise&&r._promise.then((function(e){r._canceled&&i.cancel(),n&&!r._canceled?o(t,u,n,e):t(e)}),(function(n){r._canceled&&i.cancel(),e&&!r._canceled?o(t,u,e,n):u(n)}))}),(function(){r.cancel()}));return i},t.prototype.catch=function(t){return this.then(void 0,t)},t.prototype.cancel=function(t){return this._canceled=!0,t&&this._promise&&this._promise.catch(t),this.onCancel&&this.onCancel(),this._destroy(),this},t.prototype.finally=function(t){return this._promise?this._promise.finally(t):Promise.reject(t)},t.prototype._destroy=function(){this.onCancel=void 0,this._promise=void 0},t}(),u=function(){function t(t){t&&this.copy(t)}return t.prototype.copy=function(t){try{navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),console.log("Copied to Clipboard")}catch(t){console.log("Please copy coupon manually")}},t.prototype.copyToClipboard=function(t){var n=document.createElement("input");n.value=t;try{document.body.appendChild(n),this.copyNodeContentsToClipboard(n)}finally{document.body.removeChild(n)}},t.prototype.copyNodeContentsToClipboard=function(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")},t.copy=function(n){return new t(n)},t}();function c(t,n,e){var r=window.document.createElement(t);return void 0!==n&&(r.className=n),e&&e.appendChild(r),r}var f=function(){function t(t){this.emitter=t,this._eventsStatus={}}return t.prototype.setEventStatus=function(t,n){this._eventsStatus[t]=n},t.prototype.onLoad=function(t){var n=this,e=(Array.isArray(t)?t:[t]).map((function(t){return new Promise((function(e){if(n.getEventStatus(t))e(n);else{var r=t;n.emitter.once(r,(function(){n.setEventStatus(t,!0),e(n)}))}}))}));return Promise.all(e).then((function(){return n}))},t.prototype.getEventStatus=function(t){var n=t,e=this._eventsStatus[n];return void 0!==e&&!!e},t}();function a(t,n){return t=Array.from(t),n=Array.from(n),t.length===n.length&&t.sort().every((function(t,e){return t===n.sort()[e]}))}function l(t,n,e){if((t=String(t))===(n=String(n)))return!0;if(e&&t.toUpperCase()===n.toUpperCase())return!0;var r=("^"+t+"$").replace(/%/g,".*").replace("_",".");return null!==new RegExp(r,e?"i":"").exec(n)}var s={gt:function(t,n){return t>n},lt:function(t,n){return t<n},ge:function(t,n){return t>=n},le:function(t,n){return t<=n},eq:function(t,n){return t===n},ne:function(t,n){return t!==n},in:function(t,n){return-1!==n.indexOf(t)},notin:function(t,n){return-1===n.indexOf(t)},like:function(t,n){return l(t,n)},ilike:function(t,n){return l(t,n,!0)}};function p(t){var n=t;return 3===n.length&&"string"==typeof n[0]&&"string"==typeof n[1]}function d(t,n){var e="string"==typeof n[0]?n[0]:"all",r=function(n){if(p(n)){var e=n[0],r=n[1],o=n[2],i=s[r];return!i||i(t[e],o)}return d(t,n)},o=n.filter((function(t){return Array.isArray(t)}));return"any"===e?o.some(r):o.every(r)}function y(t){return void 0===t&&(t=0),new Promise((function(n){return setTimeout(n,t)}))}function v(t,n,e){void 0===e&&(e=!1);var r=Array.isArray(n),o=r&&[]||{};return r?e?(t=t||[],o=o.concat(t),n.forEach((function(n,r){void 0===o[r]?o[r]=n:"object"==typeof n?o[r]=v(t[r],n,e):-1===t.indexOf(n)&&o.push(n)}))):o=n:(t&&"object"==typeof t&&Object.keys(t).forEach((function(n){o[n]=t[n]})),Object.keys(n).forEach((function(r){"object"==typeof n[r]&&n[r]&&"object"==typeof t[r]&&"object"==typeof n[r]?o[r]=v(t[r],n[r],e):o[r]=n[r]}))),o}function h(t,n){void 0===n&&(n=10);var e=0;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];clearTimeout(e),e=window.setTimeout((function(){return t.apply(void 0,r)}),n)}}e.d(n,"dom",(function(){return m})),e.d(n,"bindAll",(function(){return b})),e.d(n,"fixUrlStr",(function(){return g})),e.d(n,"CancelablePromise",(function(){return i})),e.d(n,"Clipboard",(function(){return u})),e.d(n,"Events",(function(){return f})),e.d(n,"arrayCompare",(function(){return a})),e.d(n,"operationsAliases",(function(){return s})),e.d(n,"checkIfPropertyFilter",(function(){return p})),e.d(n,"propertiesFilter",(function(){return d})),e.d(n,"sleep",(function(){return y})),e.d(n,"deepmerge",(function(){return v})),e.d(n,"debounce",(function(){return h}));var m=r;function b(t,n){t.forEach((function(t){n[t]&&(n[t]=n[t].bind(n))}))}function g(t){return t.replace(/([^:]\/)\/+/g,"$1")}}])}));
//# sourceMappingURL=utils.js.map
{
"name": "@nextgis/utils",
"version": "0.25.3",
"version": "0.25.4",
"description": "Development tools",

@@ -52,3 +52,3 @@ "main": "lib/utils.js",

},
"gitHead": "23c8a34ba6191c3ac70d546bc0d58b811c7d7276"
"gitHead": "1fab5502afc8a5bbd9a819856c8ddaad9a089e67"
}

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