Code Monkey home page Code Monkey logo

array-sort-by's People

Contributors

jherax avatar sebastianpuchet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

array-sort-by's Issues

TypeError: Cannot assign to read only property '28' of string ' **Bea ~#2005** 18402 moons

Hello!

I was trying to use your module to sort in descending order my leaderboard in quick.db, but I couldn't. It gives me this error:
gtrkhyrkth

Why?

Here is my leaderboard code:
`const Discord = require("discord.js");
const db = require('quick.db');
var sortBy = require('array-sort-by');
var currencyFormatter = require('currency-formatter'); //For currency
var fs = require('fs'); //FileSystem

exports.run = async (bot, message, args) => {
const resp = await db.startsWith('moons', { sort: '.data'});
resp.length = 10;
let finalOutput = ' ';
for (var i in resp) {
var us = bot.users.get(resp[i].ID.split("")[1])
//moons
${us.id}
let Moonsdisplay;
let TotalMoons;
let moons = await db.fetch(moons_${us.id})
if (moons === null) db.set(moons_${us.id}, 0);
else TotalMoons = moons;
if (TotalMoons === undefined) TotalMoons = 0;
let amount = parseInt(args.join(' '));

if (TotalMoons > 1000000) { Moonsdisplay = 'Infinitas' } else {Moonsdisplay = TotalMoons}
var usermoons = Moonsdisplay;
finalOutput += **${bot.users.get(resp[i].ID.split("_")[1]).tag}** + ' ' + usermoons + moons \n; // - Moons: ${resp[i].data}
console.log(finalOutput)
var arr = ['teste', 'do', 'caralho']
var msgtosend = await sortBy(finalOutput, item => 'desc:' + item)
}
message.channel.send({
embed: {
"description": msgtosend,
"title": 'Top de Moons',
"color": 16777215
}
})
}
module.exports.command = {
name: 'topmoons',
aliases: ['leaderboard'],
description: 'Veja os mais ricos do servidor!',
category: "Economia",
usage: 's!topmoons',
enabled: false
}`

Please fix this.

ie

For ie it not work right?

Import Failed in React native

import sortBy from 'array-sort-by'; iam using es2015 syntax to import js files

error: bundling: ReferenceError: Unknown plugin "babel-plugin-add-module-exports" specified in "/Users/jagadeesh/Projects/working/xxx/Presentation/yyyy/node_modules/array-sort-by/package.json" at 0, attempted to resolve relative to "/Users/jagadeesh/Projects/working/xxx/Presentation/yyyy/node_modules/array-sort-by"
    at /Users/jagadeesh/Projects/working/xxx/Presentation/yyyy/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
    at Array.map (native)
    at Function.normalisePlugins (/Users/jagadeesh/Projects/working/xxx/Presentation/yyyy/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
    at OptionManager.mergeOptions (/Users/jagadeesh/Projects/working/xxxx/Presentation/yyyy/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
    at OptionManager.init (/Users/jagadeesh/Projects/working/xxxx/Presentation/yyyy/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/Users/jagadeesh/Projects/working/xxx/Presentation/yyyy/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/Users/jagadeesh/Projects/working/xxxx/Presentation/yyyy/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at Pipeline.transform (/Users/jagadeesh/Projects/working/xxx/Presentation/yyyy/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at Object.transform (/Users/jagadeesh/Projects/working/iCommandV3/Presentation/yyyy/node_modules/react-native/packager/transformer.js:109:25)

babel-plugin-add-module-exports

When using webpack + babel to build my simple app this error message is shown on compile...

ERROR in ./node_modules/array-sort-by/src/sort-by.js
Module build failed: ReferenceError: Unknown plugin "babel-plugin-add-module-exports" specified 
  in "/project/node_modules/array-sort-by/package.json" 
  at 0, attempted to resolve relative to "/project/node_modules/array-sort-by"
    at /project/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
    at Array.map (native)
    at Function.normalisePlugins (/project/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
    at OptionManager.mergeOptions (/project/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
    at OptionManager.init (/project/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/project/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/project/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at Pipeline.transform (/project/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/project/node_modules/babel-loader/lib/index.js:50:20)
    at Object.module.exports (/project/node_modules/babel-loader/lib/index.js:175:20)
 @ ./src/App.js
 @ ./src/index.js
 @ multi babel-polyfill ./src/index.js

Should the 'array-sort-by' package.json be including the babel plugin ???

Cannot find module 'array-sort-by' from '...'

I have a number of React Jest / Enzyme tests which test a component that uses array-sort-by

i include the following (naming my default import as arraySort)

// make sorting by types and nested object easier
import arraySort from 'array-sort-by';

and when i have version 1.1.0 installed everything works as expected and the test all pass. However when I upgrade to version 1.2.0 then the test fail to run with the error message above....

The code still compiles but fails to run with a
(0 , _arraySortBy.sortBy) is not a function

What do I need to import in order to get version 1.2.0 importing / running - as before ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.