@rnacanvas/search 2.0.0 → 3.0.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.
package/README.md CHANGED
@@ -12,37 +12,7 @@ All exports of this package can be accessed as named imports.
12
12
 
13
13
  ```javascript
14
14
  // some example imports
15
- import { Motif, SequenceCharacter } from '@rnacanvas/search';
16
- ```
17
-
18
- ## `class Motif`
19
-
20
- Represents a motif.
21
-
22
- ```javascript
23
- var CUGCCA = new Motif('CUGCCA');
24
-
25
- CUGCCA.toString(); // "CUGCCA"
26
-
27
- // a single character motif
28
- var A = new Motif('A');
29
-
30
- A.toString(); // "A"
31
-
32
- // empty motifs are accepted
33
- var emptyMotif = new Motif('');
34
-
35
- emptyMotif.toString(); // ""
36
- ```
37
-
38
- ### `toString()`
39
-
40
- Returns the motif as a string.
41
-
42
- ```javascript
43
- var CUGCCA = new Motif('CUGCCA');
44
-
45
- CUGCCA.toString(); // "CUGCCA"
15
+ import { removeGapCharacters, SequenceCharacter } from '@rnacanvas/search';
46
16
  ```
47
17
 
48
18
  ## `function removeGapCharacters()`
@@ -1 +1 @@
1
- {"version":3,"file":"SequenceCharacter.d.ts","sourceRoot":"","sources":["../src/SequenceCharacter.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,iBAAiB;;gBAGhB,SAAS,EAAE,MAAM;IAU7B,QAAQ,IAAI,MAAM;IAIlB,OAAO,CAAC,cAAc,EAAE,iBAAiB,GAAG,MAAM,GAAG,OAAO;IAkC5D,WAAW,CAAC,cAAc,EAAE,iBAAiB,GAAG,MAAM,GAAG,OAAO;CAiCjE"}
1
+ {"version":3,"file":"SequenceCharacter.d.ts","sourceRoot":"","sources":["../src/SequenceCharacter.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,iBAAiB;;gBAGhB,SAAS,EAAE,MAAM;IAU7B,QAAQ,IAAI,MAAM;IAIlB,OAAO,CAAC,cAAc,EAAE,iBAAiB,GAAG,MAAM,GAAG,OAAO;IAgC5D,WAAW,CAAC,cAAc,EAAE,iBAAiB,GAAG,MAAM,GAAG,OAAO;CA+BjE"}
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.search=t():e.search=t()}(this,()=>(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},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 r(e){return e.replace(/[\.-]/g,"")}e.r(t),e.d(t,{SequenceCharacter:()=>a,removeGapCharacters:()=>r});var n,o=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class a{constructor(e){if(n.set(this,void 0),0==e.length)throw new Error("Character cannot be an empty string.");if(e.length>1)throw new Error("Character must be a single character.");!function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,r):o?o.value=r:t.set(e,r)}(this,n,e,"f")}toString(){return o(this,n,"f")}matches(e){var t,r;if("string"!=typeof e&&(e=e.toString()),0==e.length)throw new Error("Other character cannot be an empty string.");if(e.length>1)throw new Error("Other character cannot be multiple characters.");let a=o(this,n,"f").toUpperCase();return e=e.toUpperCase(),!(!i.includes(a)||!i.includes(e))||!i.includes(a)&&!i.includes(e)&&("N"===a&&!i.includes(e)||"N"===e&&!i.includes(a)||(a in c?null!==(r=null===(t=c[a])||void 0===t?void 0:t.includes(e))&&void 0!==r&&r:a===e))}complements(e){var t,r;if("string"!=typeof e&&(e=e.toString()),0==e.length)throw new Error("Other character cannot be an empty string.");if(e.length>1)throw new Error("Other character cannot be multiple characters.");let a=o(this,n,"f").toUpperCase();return e=e.toUpperCase(),!(!i.includes(a)||!i.includes(e))||!i.includes(a)&&!i.includes(e)&&("N"===a&&!i.includes(e)||"N"===e&&!i.includes(a)||a in s&&null!==(r=null===(t=s[a])||void 0===t?void 0:t.includes(e))&&void 0!==r&&r)}}n=new WeakMap;const i=[...".-"],c={A:[..."A"],C:[..."C"],G:[..."G"],U:[..."UT"],T:[..."TU"],R:[..."AG"],Y:[..."CUT"],S:[..."GC"],W:[..."AUT"],K:[..."GUT"],M:[..."AC"],B:[..."CGUTYSK"],D:[..."AGUTRWK"],H:[..."ACUTYWM"],V:[..."ACGRSM"]},s={A:[..."UT"],C:[..."G"],G:[..."CUTY"],U:[..."AGR"],T:[..."AGR"],R:[..."UT"],Y:[..."G"]};return t})());
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.search=t():e.search=t()}(this,()=>(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},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 r(e){return e.replace(/[\.-]/g,"")}e.r(t),e.d(t,{SequenceCharacter:()=>i,removeGapCharacters:()=>r});var n,o=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class i{constructor(e){if(n.set(this,void 0),0==e.length)throw new Error("Character cannot be an empty string.");if(e.length>1)throw new Error("Character must be a single character.");!function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,r):o?o.value=r:t.set(e,r)}(this,n,e,"f")}toString(){return o(this,n,"f")}matches(e){var t,r;if("string"!=typeof e&&(e=e.toString()),1!=e.length)return!1;let i=o(this,n,"f").toUpperCase();return e=e.toUpperCase(),!(!a.includes(i)||!a.includes(e))||!a.includes(i)&&!a.includes(e)&&("N"===i&&!a.includes(e)||"N"===e&&!a.includes(i)||(i in s?null!==(r=null===(t=s[i])||void 0===t?void 0:t.includes(e))&&void 0!==r&&r:i===e))}complements(e){var t,r;if("string"!=typeof e&&(e=e.toString()),1!=e.length)return!1;let i=o(this,n,"f").toUpperCase();return e=e.toUpperCase(),!(!a.includes(i)||!a.includes(e))||!a.includes(i)&&!a.includes(e)&&("N"===i&&!a.includes(e)||"N"===e&&!a.includes(i)||i in c&&null!==(r=null===(t=c[i])||void 0===t?void 0:t.includes(e))&&void 0!==r&&r)}}n=new WeakMap;const a=[...".-"],s={A:[..."A"],C:[..."C"],G:[..."G"],U:[..."UT"],T:[..."TU"],R:[..."AG"],Y:[..."CUT"],S:[..."GC"],W:[..."AUT"],K:[..."GUT"],M:[..."AC"],B:[..."CGUTYSK"],D:[..."AGUTRWK"],H:[..."ACUTYWM"],V:[..."ACGRSM"]},c={A:[..."UT"],C:[..."G"],G:[..."CUTY"],U:[..."AGR"],T:[..."AGR"],R:[..."UT"],Y:[..."G"]};return t})());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rnacanvas/search",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "Find motifs and complements",
5
5
  "repository": {
6
6
  "type": "git",