@alheimsins/b5-costa-mccrae-300-ipip-neo-pi-r
Advanced tools
Comparing version 3.0.7 to 3.1.0
20
index.js
@@ -28,1 +28,21 @@ const { knuthShuffle } = require('knuth-shuffle') | ||
} | ||
module.exports.getChoices = (lang = 'en') => { | ||
let choices | ||
try { | ||
choices = require(`./data/${lang}/choices`) | ||
} catch (error) { | ||
throw new Error('Choices not found. Try another language input.') | ||
} | ||
return choices | ||
} | ||
module.exports.getQuestions = (lang = 'en') => { | ||
let questions | ||
try { | ||
questions = require(`./data/${lang}/questions`) | ||
} catch (error) { | ||
throw new Error('Questions not found. Try another language input.') | ||
} | ||
return questions | ||
} |
{ | ||
"name": "@alheimsins/b5-costa-mccrae-300-ipip-neo-pi-r", | ||
"description": "Module for returning Big Five Costa and McCrae's 300 IPIP-NEO-PI-R items", | ||
"version": "3.0.7", | ||
"version": "3.1.0", | ||
"license": "MIT", | ||
@@ -23,3 +23,3 @@ "publishConfig": { | ||
"engines": { | ||
"node": ">=12.18.3" | ||
"node": ">=12.18.4" | ||
}, | ||
@@ -26,0 +26,0 @@ "files": [ |
@@ -1,3 +0,3 @@ | ||
[![Build Status](https://travis-ci.com/Alheimsins/b5-costa-mccrae-300-ipip-neo-pi-r.svg?branch=master)](https://travis-ci.com/Alheimsins/b5-costa-mccrae-300-ipip-neo-pi-r) | ||
[![Coverage Status](https://coveralls.io/repos/Alheimsins/b5-costa-mccrae-300-ipip-neo-pi-r/badge.svg?branch=master&service=github)](https://coveralls.io/github/Alheimsins/b5-costa-mccrae-300-ipip-neo-pi-r?branch=master) | ||
[![Build Status](https://travis-ci.com/Alheimsins/b5-costa-mccrae-300-ipip-neo-pi-r.svg?branch=main)](https://travis-ci.com/Alheimsins/b5-costa-mccrae-300-ipip-neo-pi-r) | ||
[![Coverage Status](https://coveralls.io/repos/Alheimsins/b5-costa-mccrae-300-ipip-neo-pi-r/badge.svg?branch=main&service=github)](https://coveralls.io/github/Alheimsins/b5-costa-mccrae-300-ipip-neo-pi-r?branch=main) | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard) | ||
@@ -18,4 +18,8 @@ | ||
```JavaScript | ||
const { getItems, getInfo } = require('@alheimsins/b5-costa-mccrae-300-ipip-neo-pi-r') | ||
const { getItems, getInfo, getChoices, getQuestions } = require('@alheimsins/b5-costa-mccrae-300-ipip-neo-pi-r') | ||
console.log(getChoices()) // returns choices in English | ||
console.log(getQuestions()) // returns questions in English | ||
console.log(getItems()) // returns English | ||
@@ -77,3 +81,3 @@ | ||
| en | English | | | ||
|ur | Urdu | Minhaaj Rehman | | ||
| ur | Urdu | Minhaaj Rehman | | ||
@@ -80,0 +84,0 @@ ## Help wanted |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
160662
6527
115
4