@rnacanvas/utilities 1.0.0 → 1.2.0

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.
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Returns true if this function detects that the user is using a Mac device.
3
+ *
4
+ * Returns false otherwise.
5
+ */
6
+ export declare function detectMac(): boolean;
7
+ //# sourceMappingURL=detectMac.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detectMac.d.ts","sourceRoot":"","sources":["../src/detectMac.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAOnC"}
package/dist/index.d.ts CHANGED
@@ -1 +1,5 @@
1
+ import { shuffled } from './shuffled';
2
+ export { shuffled };
3
+ import { detectMac } from './detectMac';
4
+ export { detectMac };
1
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.utilities=t():e.utilities=t()}(this,(()=>(()=>{"use strict";return{}})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.utilities=t():e.utilities=t()}(this,(()=>(()=>{"use strict";var e={d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function o(e){return e.map((function(e){return{v:e,priority:Math.random()}})).sort((function(e,t){return e.priority-t.priority})).map((function(e){return e.v}))}function r(){try{return window.navigator.platform.toLowerCase().includes("mac")}catch(e){return!1}}return e.r(t),e.d(t,{detectMac:()=>r,shuffled:()=>o}),t})()));
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Returns a new randomly shuffled copy of the input array of values.
3
+ *
4
+ * (Does not modify the input array of values.)
5
+ */
6
+ export declare function shuffled<T>(values: T[]): T[];
7
+ //# sourceMappingURL=shuffled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shuffled.d.ts","sourceRoot":"","sources":["../src/shuffled.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAK5C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rnacanvas/utilities",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "General utilities",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -15,6 +15,7 @@
15
15
  "@babel/preset-typescript": "^7.23.3",
16
16
  "babel-jest": "^29.7.0",
17
17
  "jest": "^29.7.0",
18
+ "jest-environment-jsdom": "^29.7.0",
18
19
  "ts-loader": "^9.5.1",
19
20
  "typescript": "^5.3.3",
20
21
  "webpack": "^5.89.0",