ha-nunjucks 1.2.3 → 1.2.4-alpha.1
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -15
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ const renderedString = renderTemplate(this.hass, templateString, context);
|
|
|
52
52
|
|
|
53
53
|
`renderTemplate` will return a string unless the result is `true` or `false` (*not* case sensitive), in which case it will return a boolean.
|
|
54
54
|
|
|
55
|
-
When the return type is expected to be a number, end users should cast these values using the nunjucks `int` or `float` filters to prevent undesired behavior caused by JavaScript forcing operations between disparate variable types. Numbers are not returned by default to prevent leading and zeroes from being truncated from numerical strings.
|
|
55
|
+
When the return type is expected to be a number, end users should cast these values using the nunjucks `int` or `float` filters to prevent undesired behavior caused by JavaScript forcing operations between disparate variable types. Numbers are not returned by default to prevent leading and trailing zeroes from being truncated from numerical strings.
|
|
56
56
|
|
|
57
57
|
`renderTemplate` will return an empty string for strings that may have been cast from nullish non-numerical values, such as `undefined`, `null`, and `None` (case sensitive).
|
|
58
58
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { renderTemplate } from './renderTemplate';
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
exports.renderTemplate = void 0;
|
|
4
|
+
var renderTemplate_1 = require("./renderTemplate");
|
|
5
|
+
Object.defineProperty(exports, "renderTemplate", { enumerable: true, get: function () { return renderTemplate_1.renderTemplate; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ha-nunjucks",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4-alpha.1",
|
|
4
4
|
"description": "Wrapper for nunjucks for use with Home Assistant frontend custom components to render templates",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,20 +31,20 @@
|
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@types/nunjucks": "
|
|
35
|
-
"custom-card-helpers": "
|
|
36
|
-
"nunjucks": "
|
|
34
|
+
"@types/nunjucks": "latest",
|
|
35
|
+
"custom-card-helpers": "latest",
|
|
36
|
+
"nunjucks": "latest"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/jest": "
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "
|
|
41
|
-
"@typescript-eslint/parser": "
|
|
42
|
-
"eslint": "
|
|
43
|
-
"husky": "
|
|
44
|
-
"prettier": "
|
|
45
|
-
"pretty-quick": "
|
|
46
|
-
"ts-jest": "
|
|
47
|
-
"ts-loader": "
|
|
48
|
-
"typescript": "
|
|
39
|
+
"@types/jest": "latest",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "latest",
|
|
41
|
+
"@typescript-eslint/parser": "latest",
|
|
42
|
+
"eslint": "latest",
|
|
43
|
+
"husky": "latest",
|
|
44
|
+
"prettier": "latest",
|
|
45
|
+
"pretty-quick": "latest",
|
|
46
|
+
"ts-jest": "latest",
|
|
47
|
+
"ts-loader": "latest",
|
|
48
|
+
"typescript": "latest"
|
|
49
49
|
}
|
|
50
50
|
}
|