forked from WebReflection/hyperHTML
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
using @ungap/template-tag-arguments instead of @ungap/template-literal
- Loading branch information
Andrea Giammarchi
committed
Jan 11, 2019
1 parent
babbca7
commit 4cf0bfe
Showing
13 changed files
with
92 additions
and
107 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
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
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
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 |
---|---|---|
@@ -1,20 +1 @@ | ||
'use strict'; | ||
const unique = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/template-literal')); | ||
|
||
// these are tiny helpers to simplify most common operations needed here | ||
const text = (node, text) => node.ownerDocument.createTextNode(text); | ||
exports.text = text; | ||
|
||
// normalizes the template once for all arguments cases | ||
const reArguments = function (template) { | ||
const args = [unique(template)]; | ||
for (let i = 1, length = arguments.length; i < length; i++) | ||
args[i] = arguments[i]; | ||
return args; | ||
} | ||
exports.reArguments = reArguments | ||
|
||
// just recycling a one-off array to use slice | ||
// in every needed place | ||
const slice = [].slice; | ||
exports.slice = slice; |
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
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
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.