@mangos/filepath 1.0.2 → 1.0.4

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
@@ -65,7 +65,7 @@ Most of the time you will be using <a href="#fn-resolve"><code>resolve</code></a
65
65
 
66
66
  <h3 id="infer-path-options">Type <code>InferPathOptions</code></h3>
67
67
 
68
- The functions <a href="fn-all-path"><code>allPath</code></a> and <a href="fn-first-path"><code>firstPath</code></a> will try to tokenize a path string based on options object specified as the second argument.
68
+ The functions <a href="#fn-all-path"><code>allPath</code></a> and <a href="#fn-first-path"><code>firstPath</code></a> will try to tokenize a path string based on options object specified as the second argument.
69
69
 
70
70
  ```typescript
71
71
  type InferPathOptions = {
@@ -204,7 +204,7 @@ function resolve(fromStr: string, ...toFragments: string[]): ParsedPath | Parsed
204
204
 
205
205
  <h5 id="fn-resolve-arguments">Arguments:</h5>
206
206
 
207
- - <code>fromStr: <i>string</i> optional</code>: A path according to a <a href="#supperted-path">path type</a>. Defaults to current working directory if absent/undefined.
207
+ - <code>fromStr: <i>string</i> optional</code>: A path according to a <a href="#supported-path">path type</a>. Defaults to current working directory if absent/undefined.
208
208
  - <code>toFragments: <i>string[]</i></code>: A sequence of paths or path segments.
209
209
 
210
210
  <h5 id="fn-resolve-return">Return:</h5>
package/dist/Token.d.ts CHANGED
@@ -14,4 +14,5 @@ export declare class Token {
14
14
  readonly error?: string;
15
15
  constructor(token: TokenValueType, value: string, start: number, end: number, error?: string);
16
16
  isRoot(): boolean;
17
+ equals(ot: Token): boolean;
17
18
  }
package/dist/Token.js CHANGED
@@ -16,6 +16,9 @@ class Token {
16
16
  isRoot() {
17
17
  return this.token === TokenEnum.ROOT;
18
18
  }
19
+ equals(ot) {
20
+ return ot.token === this.token && ot.value === this.value && ot.start === this.start && ot.end === this.end && ot.error === this.error;
21
+ }
19
22
  }
20
23
  export {
21
24
  Token
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@mangos/filepath",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "author": "jacob bogers <jkfbogers@gmail.com>",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "https://github.com/R-js/mangos.git",
7
+ "url": "git+https://github.com/R-js/mangos.git",
8
8
  "directory": "packages/filepath"
9
9
  },
10
10
  "exports": {
@@ -48,7 +48,7 @@
48
48
  "file system",
49
49
  "lfs"
50
50
  ],
51
- "license": "MIT",
51
+ "license": "Apache License 2.0",
52
52
  "scripts": {
53
53
  "prebuild": "npm run lint",
54
54
  "build": "vite build && tsc",