1.0.3 • Published 11 months ago

efficient-functions v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Funciones útiles

isURL

const { isURL } = require("efficient-functions");

console.log(isURL("https://www.npmjs.com/package/efficient-functions")); //=> True
console.log(isURL("//efficient-functions.com")); //=> False

isImageURL

const { isImageURL } = require("efficient-functions");

// Async/Await
(async () => {
  console.log(
    await isImageURL("https://www.npmjs.com/package/efficient-functions")
  );
})(); //=> False

// Promise
isImageURL("https://img.clubimagenes.com/ci/hola/hola_009.jpg").then(
  (isImage) => {
    console.log(isImage);
  }
); //=> True

shortenText

const { shortenText } = require("efficient-functions");

console.log(shortenText("Holaaaa", 3)); //=> Hol
console.log(shortenText("Holaaaa", 3, "...")); //=> Hol...

shuffleArray

const { shuffleArray } = require("efficient-functions");
const array = [0, 1, 2, 3, 4, 5];

console.log(shuffleArray(array)); //=> [1, 5, 3, 4, 2, 0]
//Tu salida será distinta.

shuffleString

const { shuffleString } = require("efficient-functions");
const string = "efficient-functions";

console.log(shuffleString(string)); //=> t-ifeftesofcninnuic
//Tu salida será distinta.
1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago