diff --git a/README.md b/README.md index d76a0a27..46f80252 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ mithril.js [](https://ww ## What is Mithril? -A modern client-side JavaScript framework for building Single Page Applications. It's small (9.79 KB gzipped), fast and provides routing and XHR utilities out of the box. +A modern client-side JavaScript framework for building Single Page Applications. It's small (10.04 KB gzipped), fast and provides routing and XHR utilities out of the box. Mithril is used by companies like Vimeo and Nike, and open source platforms like Lichess 👍. diff --git a/docs/animation.md b/docs/animation.md index de99a8eb..241fa6a9 100644 --- a/docs/animation.md +++ b/docs/animation.md @@ -1,3 +1,7 @@ + + # Animations - [Technology choices](#technology-choices) diff --git a/docs/api.md b/docs/api.md index 2f946a19..758b0cce 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1,3 +1,7 @@ + + # API ### Cheatsheet diff --git a/docs/autoredraw.md b/docs/autoredraw.md index a7a891d7..8eb2f0f6 100644 --- a/docs/autoredraw.md +++ b/docs/autoredraw.md @@ -1,3 +1,7 @@ + + # The auto-redraw system Mithril implements a virtual DOM diffing system for fast rendering, and in addition, it offers various mechanisms to gain granular control over the rendering of an application. diff --git a/docs/buildPathname.md b/docs/buildPathname.md index 35049a4c..dfc087e9 100644 --- a/docs/buildPathname.md +++ b/docs/buildPathname.md @@ -1,3 +1,6 @@ + # buildPathname(object) - [Description](#description) @@ -11,7 +14,7 @@ Turns a [path template](paths.md) and a parameters object into a string of form `/path/user?a=1&b=2` ```javascript -var querystring = m.buildPathname("/path/:id", {id: "user", a: "1", b: "2"}) +var pathname = m.buildPathname("/path/:id", {id: "user", a: "1", b: "2"}) // "/path/user?a=1&b=2" ``` @@ -19,12 +22,13 @@ var querystring = m.buildPathname("/path/:id", {id: "user", a: "1", b: "2"}) ### Signature -`querystring = m.buildPathname(object)` +`pathname = m.buildPathname(object)` Argument | Type | Required | Description ------------ | ------------------------------------------ | -------- | --- -`object` | `Object` | Yes | A key-value map to be converted into a string -**returns** | `String` | | A string representing the input object +`path` | `String` | Yes | A URL path +`query ` | `Object` | Yes | A key-value map to be converted into a string +**returns** | `String` | | A string representing the URL with the query string [How to read signatures](signatures.md) @@ -35,7 +39,7 @@ Argument | Type | Required | Descripti The `m.buildPathname` creates a [path name](paths.md) from a path template and a parameters object. It's useful for building URLs, and it's what [`m.route`](route.md), [`m.request`](request.md), and [`m.jsonp`](jsonp.md) all use internally to interpolate paths. It uses [`m.buildQueryString`](buildQueryString.md) to generate the query parameters to append to the path name. ```javascript -var querystring = m.buildPathname("/path/:id", {id: "user", a: 1, b: 2}) +var pathname = m.buildPathname("/path/:id", {id: "user", a: 1, b: 2}) -// querystring is "/path/user?a=1&b=2" +// pathname is "/path/user?a=1&b=2" ``` diff --git a/docs/buildQueryString.md b/docs/buildQueryString.md index 03f723fa..1bbb8f5f 100644 --- a/docs/buildQueryString.md +++ b/docs/buildQueryString.md @@ -1,3 +1,7 @@ + + # buildQueryString(object) - [Description](#description) @@ -23,7 +27,7 @@ var querystring = m.buildQueryString({a: "1", b: "2"}) Argument | Type | Required | Description ------------ | ------------------------------------------ | -------- | --- -`object` | `Object` | Yes | A key-value map to be converted into a string +`query` | `Object` | Yes | A key-value map to be converted into a string **returns** | `String` | | A string representing the input object [How to read signatures](signatures.md) diff --git a/docs/censor.md b/docs/censor.md index 4ece0066..9052f336 100644 --- a/docs/censor.md +++ b/docs/censor.md @@ -1,3 +1,7 @@ + + # censor(object, extra) - [Description](#description) diff --git a/docs/changelog.md b/docs/changelog.md index d5761ba6..487802f8 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,6 @@ + # Change log - [v2.0.4](#v204) diff --git a/docs/code-of-conduct.md b/docs/code-of-conduct.md index 70fbcb0a..0f41b58d 100644 --- a/docs/code-of-conduct.md +++ b/docs/code-of-conduct.md @@ -1,3 +1,7 @@ + + # Contributor Covenant Code of Conduct ## Our Pledge diff --git a/docs/components.md b/docs/components.md index 88bd707a..ad419205 100644 --- a/docs/components.md +++ b/docs/components.md @@ -1,3 +1,7 @@ + + # Components - [Structure](#structure) diff --git a/docs/contributing.md b/docs/contributing.md index acc2345c..1bc59c20 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -1,3 +1,6 @@ + # Contributing FAQs - [How do I go about contributing ideas or new features?](#how-do-i-go-about-contributing-ideas-or-new-features?) diff --git a/docs/credits.md b/docs/credits.md index df95dca5..e5e31fb9 100644 --- a/docs/credits.md +++ b/docs/credits.md @@ -1,3 +1,7 @@ + + # Credits Mithril was originally written by Leo Horie, but it is where it is today thanks to the hard work and great ideas of many people. diff --git a/docs/es6.md b/docs/es6.md index 305f5779..bec83535 100644 --- a/docs/es6.md +++ b/docs/es6.md @@ -1,3 +1,6 @@ + # ES6+ on legacy browsers - [Setup](#setup) diff --git a/docs/examples.md b/docs/examples.md index 4776f3de..7eb16607 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -1,3 +1,7 @@ + + # Examples Here are some examples of Mithril in action diff --git a/docs/fragment.md b/docs/fragment.md index f6269d07..86602d17 100644 --- a/docs/fragment.md +++ b/docs/fragment.md @@ -1,3 +1,7 @@ + + # fragment(attrs, children) - [Description](#description) diff --git a/docs/framework-comparison.md b/docs/framework-comparison.md index 786afc7e..443b0ca8 100644 --- a/docs/framework-comparison.md +++ b/docs/framework-comparison.md @@ -1,3 +1,7 @@ + + # Framework comparison - [Why not X?](#why-not-insert-favorite-framework-here?) diff --git a/docs/hyperscript.md b/docs/hyperscript.md index 29717041..7451735a 100644 --- a/docs/hyperscript.md +++ b/docs/hyperscript.md @@ -1,3 +1,7 @@ + + # m(selector, attributes, children) - [Description](#description) diff --git a/docs/index.md b/docs/index.md index a956bc1e..f82e937f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,3 +1,7 @@ + + # Introduction - [What is Mithril?](#what-is-mithril?) diff --git a/docs/installation.md b/docs/installation.md index 344ffb14..0fc4f70e 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,3 +1,7 @@ + + # Installation - [CDN](#cdn) diff --git a/docs/integrating-libs.md b/docs/integrating-libs.md index 904f1127..3c649b65 100644 --- a/docs/integrating-libs.md +++ b/docs/integrating-libs.md @@ -1,3 +1,7 @@ + + # 3rd Party Integration Integration with third party libraries or vanilla JavaScript code can be achieved via [lifecycle methods](lifecycle-methods.md). diff --git a/docs/jsonp.md b/docs/jsonp.md index a05e5123..b46c48dd 100644 --- a/docs/jsonp.md +++ b/docs/jsonp.md @@ -1,3 +1,7 @@ + + # jsonp(options) - [Description](#description) diff --git a/docs/jsx.md b/docs/jsx.md index 5f452cb8..843d37a7 100644 --- a/docs/jsx.md +++ b/docs/jsx.md @@ -1,3 +1,7 @@ + + # JSX - [Description](#description) diff --git a/docs/keys.md b/docs/keys.md index f6f82d14..b431ed76 100644 --- a/docs/keys.md +++ b/docs/keys.md @@ -1,3 +1,7 @@ + + # Keys - [What are keys?](#what-are-keys?) diff --git a/docs/layout.html b/docs/layout.html index 135bc846..4a95e101 100644 --- a/docs/layout.html +++ b/docs/layout.html @@ -1,5 +1,5 @@ - +