How to use the partialRight function from ramda
Find comprehensive JavaScript ramda.partialRight code examples handpicked from public code repositorys.
11 12 13 14 15 16 17 18 19 20const join = R.curryN(2, path.join); const sqlFile = name => path.extname(name) === SQL_EXT; const readFile = R.partialRight(fs.readFileSync, [{ encoding: 'utf-8' }]); const shortName = name => path.basename(name, SQL_EXT); const nameToContent = (acc, name) => R.assoc(shortName(name), R.trim(readFile(name)), acc);
+ 3 other calls in file
60 61 62 63 64 65 66 67 68 69 70 71console.trace(err); console.log('error: unable to parse fingerprint file'); } function toHexBuffer(string) { return partialRight(invoker(2, 'from'), ['hex', Buffer]); } function blake2bl(input) { return avon.sumBuffer(Buffer.from(input), avon.ALGORITHMS.B).toString('hex').slice(64, 128);
+ 3 other calls in file
GitHub: dibikhin/treasurer
10 11 12 13 14 15 16 17 18 19 20 21function prepare_controller({ logger, prefix, controller, error_handling_strategy }) { // for swagger router: // 'prefix_' * { 'a': b } => { 'prefix_a': b } const prefixed_action_names = map(action_name => prefix + action_name, Object.keys(controller)) const add_error_handing = partialRight(error_handling_strategy, [logger]) const wrapped_actions = map(add_error_handing, Object.values(controller)) return zipObj(prefixed_action_names, wrapped_actions) }
GitHub: shuiniuer/blog

228 229 230 231 232 233 234``` var greet = (salutation, title, firstName, lastName) => salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; var greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']); greetMsJaneJones('Hello') // 'Hello, Ms. Jane Jones!'
6342 6343 6344 6345 6346 6347 6348 6349 6350 6351* @category Function * @sig ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x) * @param {Function} f * @param {Array} args * @return {Function} * @see R.partialRight * @example * * var multiply = (a, b) => a * b; * var double = R.partial(multiply, [2]);
+ 35 other calls in file
GitHub: desenmeng/ramda
33 34 35 36 37 38 39 40 41 42 43 44R.always(1), process.exit ); // filenameToIdentifier :: String -> String var filenameToIdentifier = R.partialRight(path.basename, '.js'); // identifierToFilename :: String -> String var identifierToFilename = R.pipe(R.ifElse(R.test(/^(?!__$)_/),
GitHub: kellyi/advent
1 2 3 4 5 6 7 8 9 10 11 12const R = require('ramda'); const DATA = "./data/20221.txt"; const elves = R.pipe( R.partialRight(fs.readFileSync, ["utf8"]), R.trim, R.split('\n'), R.map(parseInt), R.splitWhenever(R.equals(NaN)),
10920 10921 10922 10923 10924 10925 10926 10927 10928 10929* @example * * const greet = (salutation, title, firstName, lastName) => * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; * * const greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']); * * greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!' * @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b) */
+ 7 other calls in file
ramda.clone is the most popular function in ramda (30311 examples)