-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dom_shim
: fix definition of placeholder
- Loading branch information
Showing
21 changed files
with
74 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
CLI args: | ||
|
||
```js | ||
import * as cl from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/cli.mjs' | ||
import * as cl from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/cli.mjs' | ||
|
||
const cli = cl.Flag.os() | ||
|
||
|
@@ -34,15 +34,15 @@ console.log(...cli.args) | |
Console clearing: | ||
|
||
```js | ||
import * as cl from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/cli.mjs' | ||
import * as cl from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/cli.mjs' | ||
|
||
cl.emptty() | ||
``` | ||
|
||
Clearing the console only once, before running your code: | ||
|
||
```js | ||
import 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/cli_emptty.mjs' | ||
import 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/cli_emptty.mjs' | ||
``` | ||
|
||
## API | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ Port and rework of https://github.com/mitranim/jol. | |
## Usage | ||
|
||
```js | ||
import * as c from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/coll.mjs' | ||
import * as c from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/coll.mjs' | ||
``` | ||
|
||
## API | ||
|
@@ -101,8 +101,8 @@ Links: [source](../coll.mjs#L101); [test/example](../test/coll_test.mjs#L218). | |
Variant of [#`Bmap`](#class-bmap) with support for key and value checks. Subclasses must override methods `.reqKey` and `.reqVal`. These methods are automatically called by `.set`. Method `.reqKey` must validate and return the given key, and method `.reqVal` must validate and return the given value. Use type assertions provided by [`lang`](lang_readme.md). | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as c from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/coll.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
import * as c from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/coll.mjs' | ||
|
||
class StrNatMap extends c.TypedMap { | ||
reqKey(key) {return l.reqStr(key)} | ||
|
@@ -242,7 +242,7 @@ Differences and advantages over `Array`: | |
The overhead of the wrapper is insignificant. | ||
|
||
```js | ||
import * as c from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/coll.mjs' | ||
import * as c from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/coll.mjs' | ||
|
||
console.log(new c.Vec()) | ||
// Vec{$: []} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,8 @@ In code intended only for browsers, simply use DOM globals. In code intended onl | |
```js | ||
/* | ||
Use a bundler or importmap to alias this import to one of: | ||
https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/dom_global_native.mjs | ||
https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/dom_global_shim.mjs | ||
https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/dom_global_native.mjs | ||
https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/dom_global_shim.mjs | ||
*/ | ||
import * as dg from 'dom_global' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,8 @@ In code intended only for non-browser environments, simply import [`dom_global_s | |
```js | ||
/* | ||
Use a bundler or importmap to alias this import to one of: | ||
https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/dom_global_native.mjs | ||
https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/dom_global_shim.mjs | ||
https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/dom_global_native.mjs | ||
https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/dom_global_shim.mjs | ||
*/ | ||
import * as dg from 'dom_global' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
## Usage | ||
|
||
```js | ||
import * as d from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/dom.mjs' | ||
import * as d from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/dom.mjs' | ||
``` | ||
|
||
## API | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
Example mockup for a pushstate link. | ||
|
||
```js | ||
import * as dr from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/dom_reg.mjs' | ||
import * as dr from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/dom_reg.mjs' | ||
|
||
// Immediately ready for use. Tag is automatically set to `a-btn`. | ||
class Btn extends dr.HTMLButtonElement { | ||
|
@@ -74,7 +74,7 @@ Registry for custom DOM element classes. Automatically derives tag name from cla | |
By default, this registry has **no global side effects**. To enable global registration, provide a "definer" to the registry. | ||
|
||
```js | ||
import * as dr from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/dom_reg.mjs' | ||
import * as dr from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/dom_reg.mjs' | ||
|
||
class Btn extends HTMLButtonElement { | ||
// Optional. If omitted, `dr.reg` autogenerates | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
## Usage | ||
|
||
```js | ||
import * as ds from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/dom_shim.mjs' | ||
import * as ds from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/dom_shim.mjs' | ||
``` | ||
|
||
## API | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ HTTP request/response utils are ported and reworked from https://github.com/mitr | |
## Usage | ||
|
||
```js | ||
import * as h from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/http.mjs' | ||
import * as h from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/http.mjs' | ||
|
||
const reqBody = {msg: `hello world`} | ||
const resBody = await h.reqBui().to(`/api`).post().json(reqBody).fetchOkJson() | ||
|
@@ -234,8 +234,8 @@ rou.groups // {key: `path`} | |
Routing is imperative: | ||
|
||
```js | ||
import * as h from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/http.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as h from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/http.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
|
||
const nextPage = route(window.location) | ||
|
||
|
@@ -263,7 +263,7 @@ Short for "request router" or "request-response router". Advanced version of [#` | |
Routing can be shared between SSR and SPA: | ||
|
||
```js | ||
import * as h from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/http.mjs' | ||
import * as h from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/http.mjs' | ||
|
||
function route(rou) { | ||
l.reqInst(rou, h.ReqRou) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,7 @@ Port and rework of https://github.com/mitranim/fpx. | |
## Usage | ||
|
||
```js | ||
import * as i from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/iter.mjs' | ||
import * as i from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/iter.mjs' | ||
``` | ||
|
||
## Perf | ||
|
@@ -314,8 +314,8 @@ Signature: `(Iter<A>, {new(A): B}) => B[]`. | |
Similar to [#`map`](#function-map), but instead of taking an arbitrary function, takes a class and calls it with `new` for each element. | ||
|
||
```js | ||
import * as i from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/iter.mjs' | ||
import * as o from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/obj.mjs' | ||
import * as i from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/iter.mjs' | ||
import * as o from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/obj.mjs' | ||
|
||
class Model extends o.Dict {pk() {return this.id}} | ||
class Person extends Model {} | ||
|
@@ -603,7 +603,7 @@ Links: [source](../iter.mjs#L397); [test/example](../test/iter_test.mjs#L1116). | |
Syntactic shortcut for creating a `Set` via variadic call. | ||
|
||
```js | ||
import * as i from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/iter.mjs' | ||
import * as i from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/iter.mjs' | ||
|
||
i.setOf(10, 20, 30) | ||
// Set{10, 20, 30} | ||
|
@@ -676,8 +676,8 @@ Similar to [#`map`](#function-map) but for dicts. | |
* The mapping function receives only one argument: each value. | ||
|
||
```js | ||
import * as i from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/iter.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as i from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/iter.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
|
||
i.mapDict({one: 10, two: 20}, l.inc) | ||
// {one: 11, two: 21} | ||
|
@@ -698,8 +698,8 @@ Similar to [#`filter`](#function-filter) but for dicts. | |
* The mapping function receives each value. | ||
|
||
```js | ||
import * as i from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/iter.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as i from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/iter.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
|
||
i.pick({one: -20, two: -10, three: 10, four: 20}, l.isFinPos) | ||
// {three: 10, four: 20} | ||
|
@@ -720,8 +720,8 @@ Similar to [#`reject`](#function-reject) but for dicts. | |
* The mapping function receives each value. | ||
|
||
```js | ||
import * as i from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/iter.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as i from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/iter.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
|
||
i.omit({one: -20, two: -10, three: 10, four: 20}, l.isFinPos) | ||
// {one: -20, two: -10} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,7 +108,7 @@ Port and rework of https://github.com/mitranim/fpx. | |
## Usage | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
``` | ||
|
||
## API | ||
|
@@ -120,7 +120,7 @@ Links: [source](../lang.mjs#L3); [test/example](../test/lang_test.mjs#L222). | |
True for `null` and `undefined`. Same as `value == null`. Incidentally, these are the only values that produce an exception when attempting to read a property: `null.someProperty`. | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
|
||
// Definition | ||
function isNil(value) {return value == null} | ||
|
@@ -154,7 +154,7 @@ Links: [source](../lang.mjs#L19); [test/example](../test/lang_test.mjs#L247). | |
Same as `typeof val === 'number'`. True if the value is a primitive number, _including_ `NaN` and `±Infinity`. In most cases you should use [#`isFin`](#function-isfin) instead. | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
|
||
l.isNum(1) | ||
// true | ||
|
@@ -173,7 +173,7 @@ Links: [source](../lang.mjs#L25); [test/example](../test/lang_test.mjs#L259). | |
Same as ES2015's [`Number.isFinite`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite). True if `val` is a primitive number and is _not_ `NaN` or `±Infinity`. In most cases you should prefer `isFin` over `isNum`. | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
|
||
l.isFin(1) | ||
// true | ||
|
@@ -501,7 +501,7 @@ Signature: `(val, test) => val` where `test: val => bool`. | |
Short for "require". Minification-friendly assertion. If `!test(val)`, throws an informative `TypeError`. Otherwise, returns `val` as-is. | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
|
||
l.req({one: `two`}, l.isObj) | ||
// {one: `two`} | ||
|
@@ -600,7 +600,7 @@ Identity test: same as `===`, but considers `NaN` equal to `NaN`. Equivalent to | |
Note that [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is) implements [_SameValue_](https://www.ecma-international.org/ecma-262/6.0/#sec-samevalue), which treats `-0` and `+0` as _distinct values_. This is typically undesirable. As a result, you should prefer `l.is` over `===` or `Object.is`. | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
|
||
l.is(1, '1') | ||
// false | ||
|
@@ -640,7 +640,7 @@ Links: [source](../lang.mjs#L423); [test/example](../test/lang_test.mjs#L1712). | |
Takes a value and creates a function that always returns that value. Sometimes useful with higher order functions. | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
|
||
const constant = l.val(1) | ||
|
||
|
@@ -658,7 +658,7 @@ Links: [source](../lang.mjs#L424); [test/example](../test/lang_test.mjs#L1726). | |
Same as `throw` but an expression rather than a statement. Also sometimes useful with higher-order functions. | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
|
||
const x = someTest ? someValue : l.panic(Error(`unreachable`)) | ||
``` | ||
|
@@ -678,7 +678,7 @@ Like [`Function.prototype.bind`](https://developer.mozilla.org/en-US/docs/Web/Ja | |
Returns a new function that represents [partial application](https://en.wikipedia.org/wiki/Partial_application) of the given function, a common tool in functional programming. When called, it joins arguments from both calls and invokes the original function. Think of it like splitting a function call in two, or more. Performance is inferior to closures; avoid in hotspots. | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
|
||
const inc = l.bind(l.add, 1) | ||
|
||
|
@@ -695,7 +695,7 @@ Links: [source](../lang.mjs#L430); [test/example](../test/lang_test.mjs#L1689). | |
Returns a new function that negates the result of the given function, like a delayed `!`. | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
|
||
function eq(a, b) {return a === b} | ||
|
||
|
@@ -727,7 +727,7 @@ Links: [source](../lang.mjs#L437); [test/example](../test/lang_test.mjs#L1148). | |
Returns `true` if the target is [#non-primitive](#function-iscomp) and has the given property on its prototype. As a consequence, this returns `false` if the target is a primitive, or has the given property as an "own" property, either enumerable or not. | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
|
||
l.hasInherited([10, 20, 30], `length`) | ||
// false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
## Usage | ||
|
||
```js | ||
import * as o from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/obj.mjs' | ||
import * as o from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/obj.mjs' | ||
``` | ||
|
||
## API | ||
|
@@ -82,8 +82,8 @@ Performance characteristics: | |
* When the number of declared properties is significantly smaller than the number of provided properties, this tends to be faster than the aforementioned assignment functions. | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as o from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/obj.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
import * as o from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/obj.mjs' | ||
|
||
class Person extends o.Struct { | ||
static Spec = class extends super.Spec { | ||
|
@@ -126,8 +126,8 @@ Differences from [#`Struct`](#class-struct): | |
* Measurably worse performance. | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/lang.mjs' | ||
import * as o from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/obj.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/lang.mjs' | ||
import * as o from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/obj.mjs' | ||
|
||
class Person extends o.StructLax { | ||
static Spec = class extends super.Spec { | ||
|
@@ -160,7 +160,7 @@ Links: [source](../obj.mjs#L304); [test/example](../test/obj_test.mjs#L786). | |
Takes a class and hacks its prototype, converting all non-inherited getters to lazy/memoizing versions of themselves that only execute _once_. The resulting value replaces the getter. Inherited getters are unaffected. | ||
|
||
```js | ||
import * as o from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/obj.mjs' | ||
import * as o from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/obj.mjs' | ||
|
||
class Bucket { | ||
static {o.memGet(this)} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,9 @@ Optionally combine with [`dom_reg`](dom_reg_readme.md) for automatic registratio | |
`MixReac` is a "mixin" that adds reactivity to the class: | ||
|
||
```js | ||
import * as o from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/obs.mjs' | ||
import * as od from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/obs_dom.mjs' | ||
import * as dr from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/dom_reg.mjs' | ||
import * as o from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/obs.mjs' | ||
import * as od from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/obs_dom.mjs' | ||
import * as dr from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/dom_reg.mjs' | ||
|
||
const obs = o.obs({msg: `hello!`}) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ Known limitations: | |
Using a specific implementation: | ||
|
||
```js | ||
import * as p from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/path.mjs' | ||
import * as p from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/path.mjs' | ||
|
||
console.log(p.posix.join(`one`, `two`)) | ||
// 'one/two' | ||
|
@@ -40,7 +40,7 @@ console.log(p.windows.join(`one`, `two`)) | |
Using the default implementation for the current OS: | ||
|
||
```js | ||
import {paths as p} from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/io_deno.mjs' | ||
import {paths as p} from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/io_deno.mjs' | ||
|
||
console.log(p.join(`one`, `two`)) | ||
// 'one/two' or 'one\\two' depending on your OS | ||
|
@@ -55,7 +55,7 @@ Links: [source](../path.mjs#L33); [test/example](../test/path_test.mjs#L17). | |
Idempotently converts a path from Windows-style to Posix-style. Useful in some edge case scenarios. | ||
|
||
```js | ||
import * as p from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].55/path.mjs' | ||
import * as p from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].56/path.mjs' | ||
|
||
console.log(p.toPosix(`one\\two\\three`)) | ||
// 'one/two/three' | ||
|
Oops, something went wrong.