littoral-templates 0.2.0-beta.1 → 0.2.0-beta.2

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
- var __spreadArrays = (this && this.__spreadArrays) || function () {
3
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
5
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
6
- r[k] = a[j];
7
- return r;
2
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
+ if (ar || !(i in from)) {
5
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
+ ar[i] = from[i];
7
+ }
8
+ }
9
+ return to.concat(ar || Array.prototype.slice.call(from));
8
10
  };
9
11
  Object.defineProperty(exports, "__esModule", { value: true });
10
12
  exports.indentWith = exports.asString = void 0;
@@ -13,7 +15,7 @@ exports.indentWith = exports.asString = void 0;
13
15
  */
14
16
  function flatten(nestedString) {
15
17
  return Array.isArray(nestedString)
16
- ? nestedString.map(flatten).reduce(function (arrL, arrR) { return __spreadArrays(arrL, arrR); })
18
+ ? nestedString.map(flatten).reduce(function (arrL, arrR) { return __spreadArray(__spreadArray([], arrL, true), arrR, true); })
17
19
  : [nestedString];
18
20
  }
19
21
  /**
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;AAKA;;GAEG;AACH,SAAS,OAAO,CAAC,YAA0B;IACvC,OAAO,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;QAC9B,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,UAAC,IAAI,EAAE,IAAI,IAAK,sBAAK,IAAI,EAAK,IAAI,GAAlB,CAAoB,CAAC;QACxE,CAAC,CAAC,CA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IAAe,OAAA,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAApB,CAAoB,EAAE,UAAC,OAAiB,IAAK,OAAA,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAvB,CAAuB,CAAC,CAAA;AAC9H,CAAC,EAJwD,CAIxD,CAAA;AAJY,QAAA,UAAU,cAItB"}
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "littoral-templates",
3
- "version": "0.2.0-beta.1",
3
+ "version": "0.2.0-beta.2",
4
4
  "description": "A small JavaScript/TypeScript framework to do templating comfortably using the template literal syntax in either JavaScript or TypeScript.",
5
5
  "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
6
7
  "scripts": {
7
8
  "build": "tsc",
9
+ "clean": "rm -rf dist",
8
10
  "pretest": "npm-run-all build",
9
11
  "test": "node dist/test/test-in-README.js"
10
12
  },