Skip to content

Commit

Permalink
Use @climb/from-entires to support node 10. Bump version up to 1.0.0-…
Browse files Browse the repository at this point in the history
…alpha.6.

Reviewed by @tolmasky.
  • Loading branch information
tolmasky committed Oct 1, 2020
1 parent 37f0ce2 commit 31ce66a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "templated-regular-expression",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "",
"main": "templated-regular-expression.js",
"scripts": {
Expand All @@ -10,6 +10,7 @@
"author": "Francisco Ryan Tolmasky I",
"license": "MIT",
"dependencies": {
"@climb/from-entries": "1.0.0-alpha.5",
"@climb/partition": "1.0.0-alpha.3"
}
}
3 changes: 2 additions & 1 deletion templated-regular-expression.js
@@ -1,4 +1,5 @@
const partition = require("@climb/partition");
const fromEntries = require("@climb/from-entries");

const template = /\$\{(?:\<(?<captured>[^\>]+)\>|(?<uncaptured>[^\}]+))\}/g;
const extract =
Expand All @@ -18,7 +19,7 @@ const insert = (source, values) => new RegExp(

const insertAll = (tuples, values) => Object.assign(
values,
Object.fromEntries(tuples.map(([name, source]) =>
fromEntries(tuples.map(([name, source]) =>
[name, insert(source, values)])));
const has = hasOwnProperty.call.bind(hasOwnProperty);
const depend = (bound, tuples) =>
Expand Down

0 comments on commit 31ce66a

Please sign in to comment.