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

openrosa-xpath-evaluator

Package Overview
Dependencies
Maintainers
5
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.3.2 to 1.4.0

src/translate.js

2

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

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

@@ -1,6 +0,4 @@

var openrosa_xpath_extensions = (function() {
var openrosa_xpath_extensions = function(translate) {
var
MILLIS_PER_DAY = 1000 * 60 * 60 * 24,
MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
RAW_NUMBER = /^(-?[0-9]+)(\.[0-9]+)?$/,

@@ -99,3 +97,3 @@ DATE_STRING = /^\d\d\d\d-\d\d-\d\d(?:T\d\d:\d\d:\d\d(?:Z|[+-]\d\d:\d\d))?$/,

} else if (c === 'b') { //short text month
sb += MONTHS[f.month - 1];
sb += translate('date.month.' + f.month);
} else if (c === 'd') { //0-padded day of month

@@ -116,3 +114,3 @@ sb += _zeroPad(f.day, 2);

} else if (c === 'a') { //Three letter short text day
sb += DAYS[f.dow - 1];
sb += translate('date.dayofweek.' + f.dow);
} else if (c === 'Z' || c === 'A' || c === 'B') {

@@ -262,3 +260,3 @@ throw new Error('unsupported escape in date format string [%' + c + ']');

};
}());
};

@@ -265,0 +263,0 @@ if(typeof define === 'function') {

@@ -1,2 +0,3 @@

define(['src/openrosa-xpath-extensions', 'src/extended-xpath', 'chai', 'lodash'], function(openRosaXpathExtensions, ExtendedXpathEvaluator, chai, _) {
define(['src/openrosa-xpath-extensions', 'src/extended-xpath', 'src/translate', 'chai', 'lodash'],
function(openRosaXpathExtensions, ExtendedXpathEvaluator, translate, chai, _) {
var TODO = function() { if(false) assert.notOk('TODO'); },

@@ -12,3 +13,3 @@ SIMPLE_DATE_MATCH = /^\d{4}-\d\d-\d\d$/,

},
openRosaXpathExtensions),
openRosaXpathExtensions(translate)),
simpleValueIs = function(textValue) {

@@ -15,0 +16,0 @@ var xml = '<simple><xpath><to><node>' + textValue +

@@ -1,3 +0,4 @@

define(['src/openrosa-xpath-extensions', 'chai', 'lodash'], function(or, chai, _) {
var f = or.func;
define(['src/openrosa-xpath-extensions', 'src/translate', 'chai', 'lodash'],
function(or, translate, chai, _) {
var f = or(translate).func;

@@ -4,0 +5,0 @@ function zeroPad(n) {

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