Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openrosa-xpath-evaluator

Package Overview
Dependencies
Maintainers
6
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openrosa-xpath-evaluator - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

2

package.json
{
"name": "openrosa-xpath-evaluator",
"version": "1.4.1",
"version": "1.4.2",
"description": "Wrapper for browsers' XPath evaluator with added support for OpenRosa extensions.",

@@ -5,0 +5,0 @@ "main": "src/openrosa-xpath.js",

@@ -5,3 +5,3 @@ var openrosa_xpath_extensions = function(translate) {

RAW_NUMBER = /^(-?[0-9]+)(\.[0-9]+)?$/,
DATE_STRING = /^\d\d\d\d-\d\d-\d\d(?:T\d\d:\d\d:\d\d(?:Z|[+-]\d\d:\d\d))?$/,
DATE_STRING = /^\d\d\d\d-\d{1,2}-\d{1,2}(?:T\d\d:\d\d:\d\d(?:Z|[+-]\d\d:\d\d))?$/,
XPR = {

@@ -36,8 +36,9 @@ boolean: function(val) { return { t:'bool', v:val }; },

_uuid_part = function(c) {
var r = Math.random()*16|0,
v=c=='x'?r:r&0x3|0x8;
return v.toString(16);
// TODO understand what these are used for - they're probably not very unique
var r = Math.random()*16|0,
v = c == 'x' ? r : r&0x3|0x8;
return v.toString(16);
},
_parseDate = function(it) {
var temp;
var temp, t;
if(it instanceof Date) {

@@ -51,3 +52,5 @@ return new Date(it);

} else if(DATE_STRING.test(it)) {
temp = it.substring(0, 10).split('-');
t = it.indexOf('T');
if(t !== -1) it = it.substring(0, t);
temp = it.split('-');
temp = new Date(temp[0], temp[1]-1, temp[2]);

@@ -54,0 +57,0 @@ return temp;

@@ -155,2 +155,8 @@ define(['src/openrosa-xpath-extensions', 'src/extended-xpath', 'src/translate', 'chai', 'lodash'],

describe('date string with single-digit day or month values', function() {
it('should insert zeroes', function() {
assert.equal(xEval("date('1970-1-2')").stringValue, '1970-01-02');
});
});
describe('number', function() {

@@ -157,0 +163,0 @@ _.forEach({

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc