Socket
Socket
Sign inDemoInstall

nemo-locatex

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nemo-locatex - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

.jshintignore

22

index.js

@@ -5,3 +5,3 @@ /*───────────────────────────────────────────────────────────────────────────*\

│ │
│ Licensed under the Apache License, Version 2.0 (the "License"); you may │
│ Licensed under the Apache License, Version 2.0 (the 'License'); you may │
│ not use this file except in compliance with the License. You may obtain │

@@ -11,3 +11,3 @@ │ a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 │

│ Unless required by applicable law or agreed to in writing, software │
│ distributed under the License is distributed on an "AS IS" BASIS, │
│ distributed under the License is distributed on an 'AS IS' BASIS, │
│ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. │

@@ -17,20 +17,18 @@ │ See the License for the specific language governing permissions and │

\*───────────────────────────────────────────────────────────────────────────*/
/* global module: true, require: true, console: true */
"use strict";
var async = require("async");
/* global module: true */
'use strict';
module.exports = {
"setup": function (config, result, callback) {
'setup': function (config, result, callback) {
var returnObj = result;
returnObj.locatex = (function locatex(_locator) {
var locale = (result.props && result.props.locale) ? result.props.locale : "default",
returnObj.locatex = function locatex(_locator) {
var locale = (result.props && result.props.locale) ? result.props.locale : 'default',
locatr = this.locator;
_locator.split(".").forEach(function (level) {
_locator.split('.').forEach(function (level) {
locatr = locatr[level];
});
return locatr[locale] || locatr["default"] || locatr;
return locatr[locale] || locatr['default'] || locatr;
}).bind(result);
}.bind(result);
callback(null, config, returnObj);
}
};
{
"name": "nemo-locatex",
"version": "0.1.1",
"version": "0.1.2",
"description": "Add Locale behavior to Nemo locators",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "grunt"
},

@@ -13,2 +13,3 @@ "repository": {

},
"registerAs": "locatex",
"dependencies": {

@@ -20,2 +21,9 @@ "async": "~0.2.8"

},
"devDependencies": {
"mocha": "~1.10.0",
"chai": "~1.6.0",
"grunt": "~0.4.1",
"grunt-simple-mocha": "~0.4.0",
"grunt-contrib-jshint": "~0.7.1"
},
"keywords": [

@@ -22,0 +30,0 @@ "Nemo",

@@ -5,2 +5,4 @@ ## nemo-locatex

[![Build Status](https://travis-ci.org/paypal/nemo-drivex.svg?branch=master)](https://travis-ci.org/paypal/nemo-drivex)
### Installation

@@ -7,0 +9,0 @@

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