openrosa-xpath-evaluator
Advanced tools
Comparing version 1.5.0 to 1.5.1
{ | ||
"name": "openrosa-xpath-evaluator", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "Wrapper for browsers' XPath evaluator with added support for OpenRosa extensions.", | ||
@@ -12,3 +12,3 @@ "main": "src/openrosa-xpath.js", | ||
"author": "Alex", | ||
"license": "MIT", | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
@@ -15,0 +15,0 @@ "chai": "^3.5.0", |
@@ -141,3 +141,3 @@ var openrosa_xpath_extensions = function(translate) { | ||
func, process, ret = {}, | ||
now_and_today = function() { return XPR.date(new Date()); }; | ||
now_and_today = function() { return XPR.date(ret._now()); }; | ||
@@ -298,2 +298,5 @@ func = { | ||
ret.process = process; | ||
ret._now = function() { | ||
return new Date(); | ||
}; | ||
@@ -300,0 +303,0 @@ return ret; |
@@ -127,2 +127,10 @@ define(['src/openrosa-xpath-extensions', 'src/translate', 'chai', 'lodash'], | ||
it('supports overriding current time', () => { | ||
const extensions = or(translate); | ||
extensions._now = function() { return new Date('2000-01-01'); }; | ||
const actual = extensions.func.now(); | ||
assert.equal(actual.t, 'date'); | ||
assert.include(actual.v.toISOString(), '2000-01-01'); | ||
}); | ||
describe('when called with invalid strings', function() { | ||
@@ -129,0 +137,0 @@ _.forEach([ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
170148
15
2733
1
80
1