distancesearch
Advanced tools
Comparing version 0.0.2 to 0.0.3
"use strict"; | ||
const DistanceComparator = require("../distancecomparator.js"); | ||
import DistanceComparator from "../distancecomparator.js"; | ||
@@ -5,0 +5,0 @@ // First parameter must be views or no-views |
"use strict"; | ||
const Celebs = require("../celebs.js"); | ||
import Celebs from "../node_modules/celebs/"; | ||
@@ -5,0 +5,0 @@ // Creating a new Celebs returns a promise wrapping the data set |
"use strict"; | ||
const Celebs = require("../celebs.js"); | ||
import Celebs from "../node_modules/celebs/"; | ||
@@ -5,0 +5,0 @@ let celeb = new Celebs("views","all"); |
"use strict"; | ||
const Celebs = require("../celebs.js"); | ||
import Celebs from "../node_modules/celebs/"; | ||
@@ -5,0 +5,0 @@ // First parameter must be views or no-views |
@@ -1,13 +0,15 @@ | ||
"use strict"; | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const basename = path.basename(module.filename); | ||
// console.log(import.meta); | ||
const basename = path.basename(import.meta.url); | ||
const dirname = path.dirname(import.meta.url).split(path.sep).pop(); | ||
const alls = []; | ||
fs.readdirSync(__dirname) | ||
.filter(function(file) { | ||
fs.readdirSync(dirname) | ||
.filter(function (file) { | ||
return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js'); | ||
}) | ||
.forEach(function(file) { | ||
require(`./${file}`); | ||
.forEach(function (file) { | ||
import(`./${file}`); | ||
}); |
{ | ||
"name": "distancesearch", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "A library to search through json objects using distance comparators like Dice Distance or the Levenshtein algorithm.", | ||
"main": "distancesearch.js", | ||
"scripts": { | ||
"test": "mocha test --compilers js:babel-register --require babel-polyfill" | ||
"test": "mocha test --compilers js:babel-register --require babel-polyfill", | ||
"ex": "node -r @std/esm ex/intro-example", | ||
"exAll": "node -r @std/esm ex/runAll" | ||
}, | ||
@@ -33,2 +35,3 @@ "repository": { | ||
"devDependencies": { | ||
"@std/esm": "^0.20.0", | ||
"babel-core": "^6.26.0", | ||
@@ -35,0 +38,0 @@ "babel-loader": "^7.1.2", |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
20828
15
450
1
18