Codota Logo For Javascript
uniq
Code IndexAdd Codota to your IDE (free)

How to use
uniq
function
in
lodash

Best JavaScript code snippets using lodash.uniq(Showing top 15 results out of 315)

origin: createdbyfahad/django-react-example

entry(pkg) {
   const dependencyNames = Object.keys(pkg.dependencies);
   const exclude =
    pkg.dllPlugin.exclude || ReactBoilerplate.dllPlugin.defaults.exclude;
   const include =
    pkg.dllPlugin.include || ReactBoilerplate.dllPlugin.defaults.include;
   const includeDependencies = uniq(dependencyNames.concat(include));

   return {
    reactBoilerplateDeps: pullAll(includeDependencies, exclude),
   };
  }
origin: TryGhost/nodecmsguide

/**
 * Generate dropdown filter values from frontmatter values.
 */
function generateFilters (projects) {
 const types = sortBy(uniq(map(projects, 'type')))
 const generators = sortBy(uniq(flatten(map(projects, 'generators'))))

 return { types, generators }
}
origin: Radrw/strapi-pro

entry(helperPkg, pluginPkg) {
   const dependencyNames = merge(Object.keys(helperPkg.dependencies), Object.keys(pluginPkg.dependencies));
   const exclude = pluginPkg.dllPlugin.exclude || StrapiPlugin.dllPlugin.defaults.exclude;
   const include = pluginPkg.dllPlugin.include || StrapiPlugin.dllPlugin.defaults.include;
   const includeDependencies = uniq(dependencyNames.concat(include));

   return {
    strapiPluginDeps: pullAll(includeDependencies, exclude),
   };
  }
origin: mindjs/mindjs

listen(appServer) {
  const port = this.appPort;
  const { SIGTERM, SIGINT } = TERMINATION_SIGNAL;

  const server = appServer.listen(port, () => {
   console.log(`App server is up and running on ${ port }`);
  });

  const handleTerminationSignal = () => {
   console.log('App server has been terminated.');
   server.close(() => {
    console.log('The server is closed');
   });
   server.unref();
  };

  uniq([SIGTERM, SIGINT, this.terminationSignal])
   .filter(Boolean)
   .map(signal => process.on(signal, handleTerminationSignal));
 }
origin: stemmlerjs/khalilstemmler-blog

const ArticlesNavigation = ({ categories, tags }) => (
 <div className="categories">
  <div className="desktop-subscribe-form-container">
   <SmallSubscribeForm/>
  </div>
  <br/>
  <div className="categories--parent-category">Tags</div>
  <div className="categories--tags-container">
   {uniq(tags)
    .filter((e) => !!e)
    .map((tag, i) => (
    <Link 
     activeClassName="active"
     to={`/articles/tags/${kebabCase(tag)}/`} 
     key={i}>#{tag}</Link>
   ))}
  </div>
  
 </div>
)
origin: mikeal/bong-bong

function sort (shortnames, search) {
 shortnames = uniq(shortnames).sort()
 let first = null
 let last = null
 for (var i = 0; i < shortnames.length; i++) {
  let short = shortnames[i]
  if (startsWith(short, ':' + search)) {
   if (first === null) first = i
   last = i
  }
 }
 return [].concat(
  shortnames.slice(first, last + 1),
  shortnames.slice(0, first),
  shortnames.slice(last + 1)
 )
}
origin: bukinoshita/open-source

static async getInitialProps() {
  const getIssuesRes = await fetch(
   `https://api.github.com/search/issues?q=state:open+label:first-timers-only&sort=created&order=desc&per_page=100&access_token=${
    process.env.GITHUB_TOKEN
   }`,
   { cache: 'default' }
  )
  const issuesResJson = await getIssuesRes.json()
  const issues = issuesResJson.items
  const repoLanguagesStore = await getLanguages(issues)
  const languages = uniq(flatten(Object.values(repoLanguagesStore)))
  const languageCountStore = languages.reduce(
   (languageCountStore, language) => set(languageCountStore, language, 0),
   { [clearLanguageFilterButtonText]: issues.length }
  )

  issues.forEach(issue => {
   issue.languages = repoLanguagesStore[issue.repository_url]
   issue.languages.forEach(language => (languageCountStore[language] += 1))
  })

  return { issues, languageCountStore }
 }
origin: Tawling/react-example

const userIds = uniq(posts.map((post) => post.userId))
origin: wwarodom/ReactExample

entry(pkg) {
   const dependencyNames = Object.keys(pkg.dependencies);
   const exclude = pkg.dllPlugin.exclude || ReactBoilerplate.dllPlugin.defaults.exclude;
   const include = pkg.dllPlugin.include || ReactBoilerplate.dllPlugin.defaults.include;
   const includeDependencies = uniq(dependencyNames.concat(include));

   return {
    reactBoilerplateDeps: pullAll(includeDependencies, exclude),
   };
  }
origin: Radrw/strapi-pro

entry(helperPkg, pluginPkg) {
   const dependencyNames = merge(Object.keys(helperPkg.dependencies), Object.keys(pluginPkg.dependencies));
   const exclude = pluginPkg.dllPlugin.exclude || StrapiPlugin.dllPlugin.defaults.exclude;
   const include = pluginPkg.dllPlugin.include || StrapiPlugin.dllPlugin.defaults.include;
   const includeDependencies = uniq(dependencyNames.concat(include));

   return {
    strapiPluginDeps: pullAll(includeDependencies, exclude),
   };
  }
origin: LiuYan2016/MyReactDemo

entry(pkg) {
   const dependencyNames = Object.keys(pkg.dependencies);
   const exclude = pkg.dllPlugin.exclude || ReactBoilerplate.dllPlugin.defaults.exclude;
   const include = pkg.dllPlugin.include || ReactBoilerplate.dllPlugin.defaults.include;
   const includeDependencies = uniq(dependencyNames.concat(include));

   return {
    reactBoilerplateDeps: pullAll(includeDependencies, exclude),
   };
  }
origin: Substruct-Js/example-react-app

entry(pkg) {
   const dependencyNames = Object.keys(pkg.dependencies);
   const exclude = pkg.dllPlugin.exclude || ReactBoilerplate.dllPlugin.defaults.exclude;
   const include = pkg.dllPlugin.include || ReactBoilerplate.dllPlugin.defaults.include;
   const includeDependencies = uniq(dependencyNames.concat(include));

   return {
    reactBoilerplateDeps: pullAll(includeDependencies, exclude),
   };
  }
origin: IamJoseph/JoesReactWebsite

entry(pkg) {
   const dependencyNames = Object.keys(pkg.dependencies);
   const exclude = pkg.dllPlugin.exclude || ReactBoilerplate.dllPlugin.defaults.exclude;
   const include = pkg.dllPlugin.include || ReactBoilerplate.dllPlugin.defaults.include;
   const includeDependencies = uniq(dependencyNames.concat(include));

   return {
    reactBoilerplateDeps: pullAll(includeDependencies, exclude),
   };
  }
origin: ArtemKha/RRmusicPlayer

entry(pkg) {
   const dependencyNames = Object.keys(pkg.dependencies);
   const exclude = pkg.dllPlugin.exclude || ReactBoilerplate.dllPlugin.defaults.exclude;
   const include = pkg.dllPlugin.include || ReactBoilerplate.dllPlugin.defaults.include;
   const includeDependencies = uniq(dependencyNames.concat(include));

   return {
    reactBoilerplateDeps: pullAll(includeDependencies, exclude),
   };
  }
origin: mindjs/mindjs

listen(appServer) {
  const port = this.appPort;
  const { SIGTERM, SIGINT } = TERMINATION_SIGNAL;

  const server = appServer.listen(port, () => {
   console.log(`App server is up and running on ${ port }`);
  });

  const handleTerminationSignal = () => {
   console.log('App server has been terminated.');
   server.close(() => {
    console.log('The server is closed');
   });
   server.unref();
  };

  uniq([SIGTERM, SIGINT, this.terminationSignal])
   .filter(Boolean)
   .map(signal => process.on(signal, handleTerminationSignal));
 }
lodash(npm)uniq

Most used lodash functions

  • LoDashStatic.map
    Creates an array of values by running each element in collection through iteratee. The iteratee is
  • LoDashStatic.isEmpty
    Checks if value is empty. A value is considered empty unless it’s an arguments object, array, string
  • LoDashStatic.forEach
    Iterates over elements of collection invoking iteratee for each element. The iteratee is invoked wit
  • LoDashStatic.find
    Iterates over elements of collection, returning the first element predicate returns truthy for.
  • LoDashStatic.pick
    Creates an object composed of the picked `object` properties.
  • LoDashStatic.get,
  • LoDashStatic.isArray,
  • LoDashStatic.filter,
  • LoDashStatic.merge,
  • LoDashStatic.isString,
  • LoDashStatic.isFunction,
  • LoDashStatic.assign,
  • LoDashStatic.extend,
  • LoDashStatic.includes,
  • LoDashStatic.keys,
  • LoDashStatic.cloneDeep,
  • LoDashStatic.uniq,
  • LoDashStatic.isObject,
  • LoDashStatic.omit

Popular in JavaScript

  • redis
    Redis client library
  • minimatch
    a glob matcher in javascript
  • qs
    A querystring parser that supports nesting and arrays, with a depth limit
  • mkdirp
    Recursively mkdir, like `mkdir -p`
  • async
    Higher-order functions and common patterns for asynchronous code
  • colors
    get colors in your node.js console
  • mime-types
    The ultimate javascript content-type utility.
  • express
    Fast, unopinionated, minimalist web framework
  • cheerio
    Tiny, fast, and elegant implementation of core jQuery designed specifically for the server
  • Top plugins for WebStorm
    The challenge is finding the best plugins for JavaScript development on Intellij IDEs. Who wants to sit there and go over hundreds of plugins to pick the best?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJavascript Code Index
Get Codota for your IDE now